<div>I am having problem reading file if the file is opened with
O_DIERCT flag.The error given by read system call is 'Bad Address'.</div>
<div>The buffer where i am trying to read is a device that is mapped into the process address space.</div>
<div>I have checked that buffer is mapped by looking into the proc/<pid of my process>/maps.</div>
<div>I am using ext2 filesysytem with blocksize is 2048.</div>
<div>The address where i am trying to read is block aligned(i.e 2048
byte aligned) and the number of bytes i am trying to read is also
multiple of 2048.</div>
<div>I am using kernel release:2.6.XXX.</div>
<div> </div>
<div>I couldn't understand why it's creating problem with O_DIRECT
because the program works if i open file without O_DIRECT or if i
create temporary buffer for read function.<br>
</div>
<span class="sg">
<div> </div>
<div>-manisha</div></span>