<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/nfs/write.c, branch v2.6.26</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>NFS: nfs_updatepage(): don't mark page as dirty if an error occurred</title>
<updated>2008-06-23T21:09:07+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-06-05T20:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8'/>
<id>03fa9e84e5dc10aeacb0e4eb2f708cd9fc36a5b8</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: fix race in nfs_dirty_request</title>
<updated>2008-05-16T16:43:23+00:00</updated>
<author>
<name>Fred Isaman</name>
<email>iisaman@citi.umich.edu</email>
</author>
<published>2008-05-01T17:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=38def50fabc479dc96ea6bd2cb2526e0dfc36fa4'/>
<id>38def50fabc479dc96ea6bd2cb2526e0dfc36fa4</id>
<content type='text'>
When called from nfs_flush_incompatible, the req is not locked, so
req-&gt;wb_page might be set to NULL before it is used by PageWriteback.

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When called from nfs_flush_incompatible, the req is not locked, so
req-&gt;wb_page might be set to NULL before it is used by PageWriteback.

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Ensure that rpc_run_task() errors are propagated back to the caller</title>
<updated>2008-04-19T20:53:08+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-04-14T18:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dbae4c73f08b8a7980cc912954ade3d4c1fb6147'/>
<id>dbae4c73f08b8a7980cc912954ade3d4c1fb6147</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Ensure that the write code cleans up properly when rpc_run_task() fails</title>
<updated>2008-04-19T20:53:05+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-04-15T20:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9d8f89d9816c1d16ada492aa547a4d692508c0d'/>
<id>c9d8f89d9816c1d16ada492aa547a4d692508c0d</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Fix nfs_wb_page() to always exit with an error or a clean page</title>
<updated>2008-04-19T20:52:58+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-04-11T20:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=73e3302f60c0e11a0db0b34b903f591139c4f937'/>
<id>73e3302f60c0e11a0db0b34b903f591139c4f937</id>
<content type='text'>
It is possible for nfs_wb_page() to sometimes exit with 0 return value, yet
the page is left in a dirty state.
For instance in the case where the server rebooted, and the COMMIT request
failed, then all the previously "clean" pages which were cached by the
server, but were not guaranteed to have been writted out to disk,
have to be redirtied and resent to the server.
The fix is to have nfs_wb_page_priority() check that the page is clean
before it exits...

This fixes a condition that triggers the BUG_ON(PagePrivate(page)) in
nfs_create_request() when we're in the nfs_readpage() path.

Also eliminate a redundant BUG_ON(!PageLocked(page)) while we're at it. It
turns out that clear_page_dirty_for_io() has the exact same test.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible for nfs_wb_page() to sometimes exit with 0 return value, yet
the page is left in a dirty state.
For instance in the case where the server rebooted, and the COMMIT request
failed, then all the previously "clean" pages which were cached by the
server, but were not guaranteed to have been writted out to disk,
have to be redirtied and resent to the server.
The fix is to have nfs_wb_page_priority() check that the page is clean
before it exits...

This fixes a condition that triggers the BUG_ON(PagePrivate(page)) in
nfs_create_request() when we're in the nfs_readpage() path.

Also eliminate a redundant BUG_ON(!PageLocked(page)) while we're at it. It
turns out that clear_page_dirty_for_io() has the exact same test.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: nfs_redirty_request</title>
<updated>2008-03-19T21:59:56+00:00</updated>
<author>
<name>Fred</name>
<email>iisaman@citi.umich.edu</email>
</author>
<published>2008-03-19T15:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d884e8fc8114dc8877218f06a9a9a1d801901e4'/>
<id>6d884e8fc8114dc8877218f06a9a9a1d801901e4</id>
<content type='text'>
Both flush functions have the same error handling routine.  Pull
it out as a function.

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both flush functions have the same error handling routine.  Pull
it out as a function.

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'hotfixes' into devel</title>
<updated>2008-03-19T21:59:44+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-03-19T21:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c7c350e92aab1bba68f26a6027b734adcf9824ba'/>
<id>c7c350e92aab1bba68f26a6027b734adcf9824ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs: don't ignore return value from nfs_pageio_add_request</title>
<updated>2008-03-19T21:59:02+00:00</updated>
<author>
<name>Fred Isaman</name>
<email>iisaman@citi.umich.edu</email>
</author>
<published>2008-03-19T15:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f8512ad0da16cbe156f3a7627971cdf0b39c4138'/>
<id>f8512ad0da16cbe156f3a7627971cdf0b39c4138</id>
<content type='text'>
Ignoring the return value from nfs_pageio_add_request can cause deadlocks.

In read path:
  call nfs_pageio_add_request from readpage_async_filler
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc-&gt;pg_error is set.
  This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
    request.
  BUT, since return code is ignored, readpage_async_filler assumes it has
    been added, and does nothing further, leaving page locked.
  do_generic_mapping_read will eventually call lock_page, resulting in deadlock

In write path:
  page is marked dirty by generic_perform_write
  nfs_writepages is called
  call nfs_pageio_add_request from nfs_page_async_flush
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc-&gt;pg_error is set.
  This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
    request, yet marking the request as locked (PG_BUSY) and in writeback,
    clearing dirty marks.
  The next time a write is done to the page, deadlock will result as
    nfs_write_end calls nfs_update_request

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ignoring the return value from nfs_pageio_add_request can cause deadlocks.

In read path:
  call nfs_pageio_add_request from readpage_async_filler
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc-&gt;pg_error is set.
  This causes nfs_pageio_add_request to return 0, *WITHOUT* adding the original
    request.
  BUT, since return code is ignored, readpage_async_filler assumes it has
    been added, and does nothing further, leaving page locked.
  do_generic_mapping_read will eventually call lock_page, resulting in deadlock

In write path:
  page is marked dirty by generic_perform_write
  nfs_writepages is called
  call nfs_pageio_add_request from nfs_page_async_flush
  assume at this point that there are requests already in desc, that
    can't be merged with the current request.
  so nfs_pageio_doio is fired up to clear out desc.
  assume something goes wrong in setting up the io, so desc-&gt;pg_error is set.
  This causes nfs_page_async_flush to return 0, *WITHOUT* adding the original
    request, yet marking the request as locked (PG_BUSY) and in writeback,
    clearing dirty marks.
  The next time a write is done to the page, deadlock will result as
    nfs_write_end calls nfs_update_request

Signed-off-by: Fred Isaman &lt;iisaman@citi.umich.edu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NFS: Fix an f_mode/f_flags confusion in fs/nfs/write.c</title>
<updated>2008-03-07T19:33:40+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-02-25T23:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=af1b8c2ff7c337c4e96db12d6b7b61eaa91aa069'/>
<id>af1b8c2ff7c337c4e96db12d6b7b61eaa91aa069</id>
<content type='text'>
O_SYNC is stored in filp-&gt;f_flags.
Thanks to Al Viro for pointing out the bug.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
O_SYNC is stored in filp-&gt;f_flags.
Thanks to Al Viro for pointing out the bug.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'cleanups' into next</title>
<updated>2008-02-29T07:48:05+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2008-02-29T07:48:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cdd0972945dbcb8ea24db365d9b0e100af2a27bb'/>
<id>cdd0972945dbcb8ea24db365d9b0e100af2a27bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
