<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/direct.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-07-26T23:49:47Z</updated>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Arun Sharma</name>
</author>
<published>2011-07-26T23:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>urn:sha1:60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nfs_open_context doesn't need struct path either</title>
<updated>2011-07-20T05:43:44Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-06-22T22:40:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d4ff43d895c50319af45eb4bf04a4618eccdf76'/>
<id>urn:sha1:3d4ff43d895c50319af45eb4bf04a4618eccdf76</id>
<content type='text'>
just dentry, please...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>NFS: account direct-io into task io accounting</title>
<updated>2011-03-11T20:39:27Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
</author>
<published>2011-02-21T21:28:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ec10f26e1fd5fcceb9c96e508c1292a816199f7'/>
<id>urn:sha1:7ec10f26e1fd5fcceb9c96e508c1292a816199f7</id>
<content type='text'>
Account NFS direct-io reads and writes into Task I/O Accounting.
Do it before complition to handle aio.

NFS have unusual direct-io implementation,
thus accounting in generic code does not work.

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@openvz.org&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: remove pointless if statement in nfs_direct_write_result</title>
<updated>2011-03-11T20:38:40Z</updated>
<author>
<name>Fred Isaman</name>
</author>
<published>2011-02-11T15:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83762c56c1ba7c5b4b92fb32d570661633228bc6'/>
<id>urn:sha1:83762c56c1ba7c5b4b92fb32d570661633228bc6</id>
<content type='text'>
The code was doing nothing more in either branch of the if.

Signed-off-by: Fred Isaman &lt;iisaman@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix "kernel BUG at fs/aio.c:554!"</title>
<updated>2011-01-25T20:24:47Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2011-01-21T15:54:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=839f7ad6932d95f4d5ae7267b95c574714ff3d5b'/>
<id>urn:sha1:839f7ad6932d95f4d5ae7267b95c574714ff3d5b</id>
<content type='text'>
Nick Piggin reports:

&gt; I'm getting use after frees in aio code in NFS
&gt;
&gt; [ 2703.396766] Call Trace:
&gt; [ 2703.396858]  [&lt;ffffffff8100b057&gt;] ? native_sched_clock+0x27/0x80
&gt; [ 2703.396959]  [&lt;ffffffff8108509e&gt;] ? put_lock_stats+0xe/0x40
&gt; [ 2703.397058]  [&lt;ffffffff81088348&gt;] ? lock_release_holdtime+0xa8/0x140
&gt; [ 2703.397159]  [&lt;ffffffff8108a2a5&gt;] lock_acquire+0x95/0x1b0
&gt; [ 2703.397260]  [&lt;ffffffff811627db&gt;] ? aio_put_req+0x2b/0x60
&gt; [ 2703.397361]  [&lt;ffffffff81039701&gt;] ? get_parent_ip+0x11/0x50
&gt; [ 2703.397464]  [&lt;ffffffff81612a31&gt;] _raw_spin_lock_irq+0x41/0x80
&gt; [ 2703.397564]  [&lt;ffffffff811627db&gt;] ? aio_put_req+0x2b/0x60
&gt; [ 2703.397662]  [&lt;ffffffff811627db&gt;] aio_put_req+0x2b/0x60
&gt; [ 2703.397761]  [&lt;ffffffff811647fe&gt;] do_io_submit+0x2be/0x7c0
&gt; [ 2703.397895]  [&lt;ffffffff81164d0b&gt;] sys_io_submit+0xb/0x10
&gt; [ 2703.397995]  [&lt;ffffffff8100307b&gt;] system_call_fastpath+0x16/0x1b
&gt;
&gt; Adding some tracing, it is due to nfs completing the request then
&gt; returning something other than -EIOCBQUEUED, so aio.c
&gt; also completes the request.

To address this, prevent the NFS direct I/O engine from completing
async iocbs when the forward path returns an error without starting
any I/O.

This fix appears to survive ^C during both "xfstest no. 208" and "fsx
-Z."

It's likely this bug has existed for a very long while, as we are seeing
very similar symptoms in OEL 5.  Copying stable.

Cc: Stable &lt;stable@kernel.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Pure nfs client performance using odirect.</title>
<updated>2010-11-22T18:24:42Z</updated>
<author>
<name>Arun Bharadwaj</name>
</author>
<published>2010-11-18T10:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b47d19de2c714020ba8f5545a6e7d4968f37eb45'/>
<id>urn:sha1:b47d19de2c714020ba8f5545a6e7d4968f37eb45</id>
<content type='text'>
When an application opens a file with O_DIRECT flag, if the size of
the data that is written is equal to wsize, the client sends a
WRITE RPC with stable flag set to UNSTABLE followed by a single
COMMIT RPC rather than sending a single WRITE RPC with the stable
flag set to FILE_SYNC. This a bug.

Patch to fix this.

Signed-off-by: Arun R Bharadwaj &lt;arun@linux.vnet.ibm.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Fixed Regression in NFS Direct I/O path</title>
<updated>2010-10-28T15:14:05Z</updated>
<author>
<name>Steve Dickson</name>
</author>
<published>2010-10-28T12:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=568a810d7edd58bd505222dd1c7e48895532290b'/>
<id>urn:sha1:568a810d7edd58bd505222dd1c7e48895532290b</id>
<content type='text'>
A typo, introduced by commit f11ac8db, in the nfs_direct_write()
routine causes writes with O_DIRECT set to fail with a ENOMEM error.

Found-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Ensure that we track the NFSv4 lock state in read/write requests.</title>
<updated>2010-07-30T18:41:56Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2010-06-25T20:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f11ac8db5d07b6e99d41ff4aa39d878ee5cef1c5'/>
<id>urn:sha1:f11ac8db5d07b6e99d41ff4aa39d878ee5cef1c5</id>
<content type='text'>
This patch fixes bugzilla entry 14501:
  https://bugzilla.kernel.org/show_bug.cgi?id=14501

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Too many GETATTR and ACCESS calls after direct I/O</title>
<updated>2010-02-16T03:53:43Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2010-02-15T17:19:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65d269538a1129495ac45a14a777cd11cfe881d8'/>
<id>urn:sha1:65d269538a1129495ac45a14a777cd11cfe881d8</id>
<content type='text'>
The cached read and write paths initialize fattr-&gt;time_start in their
setup procedures.  The value of fattr-&gt;time_start is propagated to
read_cache_jiffies by nfs_update_inode().  Subsequent calls to
nfs_attribute_timeout() will then use a good time stamp when
computing the attribute cache timeout, and squelch unneeded GETATTR
calls.

Since the direct I/O paths erroneously leave the inode's
fattr-&gt;time_start field set to zero, read_cache_jiffies for that inode
is set to zero after any direct read or write operation.  This
triggers an otw GETATTR or ACCESS call to update the file's attribute
and access caches properly, even when the NFS READ or WRITE replies
have usable post-op attributes.

Make sure the direct read and write setup code performs the same fattr
initialization as the cached I/O paths to prevent unnecessary GETATTR
calls.

This was likely introduced by commit 0e574af1 in 2.6.15, which appears
to add new nfs_fattr_init() call sites in the cached read and write
paths, but not in the equivalent places in fs/nfs/direct.c.  A
subsequent commit in the same series, 33801147, introduces the
fattr-&gt;time_start field.

Interestingly, the direct write reschedule path already has a call to
nfs_fattr_init() in the right place.

Reported-by: Quentin Barnes &lt;qbarnes@yahoo-inc.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
