[linux-cifs-client] Re: [PATCH] cifs: prevent cifs_writepages() from skipping unwritten pages

Dave Kleikamp shaggy at linux.vnet.ibm.com
Mon Nov 17 15:59:07 GMT 2008


On Mon, 2008-11-17 at 09:42 -0600, Shirish S Pargaonkar wrote:

> Shaggy, 
> 
> But if the pdflush grabbed it to write, it would percolate down to 
> calling cifs_writepages right?  If so, how come we do not see those 
> at the server, we would have seen samba server logging those write
> andx 
> and perhaps the offsets would be out of order but there in the samba 
> log file nonetheless! 
> 
You're more familiar with what's been logged, but let me explain what I
think may be happening, and you can tell me if it fits your
observations.

The cifs_flush thread gets into cifs_writepages and pagevec_lookup_tag()
returns 14 pages, let's say pages 0-13.
 -----
The pdflush thread writes some smaller number of pages, 0-4.
 -----
After waiting on page 0, the cifs_flush thread sees that it's no longer
dirty, and calls pagevec_lookup_tag() again, but index has been set to
14, so it gets back pages 14-27.  Pages 5-13 get missed.
-- 
David Kleikamp
IBM Linux Technology Center



More information about the linux-cifs-client mailing list