Copying <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linuxcprogramming@lists.linux.org.au" target="_blank"><font size="2">linuxcprogramming@lists.linux.org.au </font></a>....<br><br>---------- Forwarded message ----------
<br><span class="gmail_quote">From: <b class="gmail_sendername">Manisha Maheshwari</b> <<a href="mailto:maheshwari.manisha@gmail.com">maheshwari.manisha@gmail.com</a>><br>Date: Jun 3, 2007 12:31 AM<br>Subject: Re: [LCP]Problem reading file with O_DIRECT
<br>To: Ankit Patel <<a href="mailto:ankitp@cdac.in">ankitp@cdac.in</a>><br><br></span>
<div>Hello Ankit,</div>
<div> </div>
<div>I just saw your mail.</div>
<div> </div>
<div>I was getting that error because we werer using remap_pfn_range for implementing a mmap but that incorrect in our case. We were supposed to use vma no page for implementing mmap.</div>
<div> </div>
<div>Here is the link which explains the same..<br> </div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.ussg.iu.edu/hypermail/linux/kernel/0010.2/0420.html" target="_blank">http://www.ussg.iu.edu/hypermail/linux/kernel/0010.2/0420.html</a></div>
<div> </div>
<div>hope this helps..</div><span class="sg">
<div> </div>
<div>-Manisha<br> </div></span>
<div><span class="e" id="q_112f07ef2a204068_2">
<div><span class="gmail_quote">On 5/11/07, <b class="gmail_sendername">Ankit Patel</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ankitp@cdac.in" target="_blank">ankitp@cdac.in</a>> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div bgcolor="#ffffff">
<div>Hello <span name="st">Manisha</span>,</div>
<div> </div>
<div><font face="Arial" size="2">This has reference to ur below mail on <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linuxcprogramming@lists.linux.org.au" target="_blank">linuxcprogramming@lists.linux.org.au
</a></font></div>
<div><strong></strong> </div>
<div>I need ur urgent help.. I am facing same problem.. I tried to find solution but still not got it...</div>
<div> </div>
<div><font face="Arial" size="2">Please let me know how u had solved the problem...</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Its very urgent...Please...</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Regards,</font></div>
<div><font face="Arial" size="2">Ankit Patel</font></div>
<div><font face="Arial" size="2">C-DAC,Pune</font></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong><span name="st">Manisha</span> Maheshwari</strong> <a title="[LCP]Problem reading file with O_DIRECT" onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linuxcprogramming%40lists.linux.org.au?Subject=%5BLCP%5DProblem%20reading%20file%20with%20O_DIRECT&In-Reply-To=" target="_blank">
maheshwari.<span name="st">manisha</span> at gmail.com </a><br><i>Thu Jul 6 07:18:04 UTC 2006</i> </div>
<p>
<ul>
<li><b>Messages sorted by:</b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.linux.org.au/archives/linuxcprogramming/2006-July/date.html#1132" target="_blank">[ date ]</a> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.linux.org.au/archives/linuxcprogramming/2006-July/thread.html#1132" target="_blank">
[ thread ]</a> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.linux.org.au/archives/linuxcprogramming/2006-July/subject.html#1132" target="_blank">[ subject ]</a> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.linux.org.au/archives/linuxcprogramming/2006-July/author.html#1132" target="_blank">
[ author ]</a> </li></ul>
<div>
<hr>
</div><pre>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'. The buffer where i am trying to read is a device that is mapped into the process address space. I have checked that buffer is mapped by looking into the proc/<pid of my process>/maps. I am using ext2 filesysytem with blocksize is 2048. 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. I am using kernel release:2.6.XXX. 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. -
<span name="st">manisha</span> -------------- next part -------------- An HTML attachment was scrubbed... URL: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20060706/a2282862/attachment.htm" target="_blank">
http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20060706/a2282862/attachment.htm</a>
</pre>
<p></p>
<p></p></p></div></blockquote></div><br></span></div>