<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/write.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-02-16T19:09:42Z</updated>
<entry>
<title>NFS: Add a cond_resched() to nfs_commit_release_pages()</title>
<updated>2018-02-16T19:09:42Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2017-12-18T19:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79e10b1a8dbc3da57fae6fef90f4112e65b3d214'/>
<id>urn:sha1:79e10b1a8dbc3da57fae6fef90f4112e65b3d214</id>
<content type='text'>
commit 7f1bda447c9bd48b415acedba6b830f61591601f upstream.

The commit list can get very large, and so we need a cond_resched()
in nfs_commit_release_pages() in order to ensure we don't hog the CPU
for excessive periods of time.

Reported-by: Mike Galbraith &lt;efault@gmx.de&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>nfs: don't create zero-length requests</title>
<updated>2016-08-20T16:09:21Z</updated>
<author>
<name>Benjamin Coddington</name>
</author>
<published>2016-07-18T14:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d6562fded3ce875b8a7fc30eeed73b16366d77e'/>
<id>urn:sha1:3d6562fded3ce875b8a7fc30eeed73b16366d77e</id>
<content type='text'>
commit 149a4fddd0a72d526abbeac0c8deaab03559836a upstream.

NFS doesn't expect requests with wb_bytes set to zero and may make
unexpected decisions about how to handle that request at the page IO layer.
Skip request creation if we won't have any wb_bytes in the request.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Reviewed-by: Weston Andros Adamson &lt;dros@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFSv4.1/pnfs: Retry through MDS when getting bad length of data</title>
<updated>2015-10-21T20:55:47Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-10-16T09:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8417b481cce2bed4744fda733f2ff22278bd7ce'/>
<id>urn:sha1:f8417b481cce2bed4744fda733f2ff22278bd7ce</id>
<content type='text'>
If non rpc-based layout driver return bad length of data, nfs retries
by calling rpc_restart_call_prepare() that cause an NULL reference panic.

This patch lets nfs retry through MDS for non rpc-based layout driver
return bad length of data.

[13034.883329] BUG: unable to handle kernel NULL pointer dereference at           (null)
[13034.884902] IP: [&lt;ffffffffa00db372&gt;] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
[13034.886558] PGD 0
[13034.888126] Oops: 0000 [#1] KASAN
[13034.889710] Modules linked in: blocklayoutdriver(OE) nfsv4(OE) nfs(OE) fscache(E) nfsd(OE) xfs libcrc32c coretemp btrfs crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ppdev vmw_balloon auth_rpcgss shpchp nfs_acl lockd vmw_vmci parport_pc xor raid6_pq grace parport sunrpc i2c_piix4 vmwgfx drm_kms_helper ttm drm mptspi e1000 serio_raw scsi_transport_spi mptscsih mptbase ata_generic pata_acpi [last unloaded: fscache]
[13034.898260] CPU: 0 PID: 10112 Comm: kworker/0:1 Tainted: G           OE   4.3.0-rc5+ #279
[13034.899932] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015
[13034.903342] Workqueue: events bl_read_cleanup [blocklayoutdriver]
[13034.905059] task: ffff88006a9148c0 ti: ffff880035e90000 task.ti: ffff880035e90000
[13034.906827] RIP: 0010:[&lt;ffffffffa00db372&gt;]  [&lt;ffffffffa00db372&gt;] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
[13034.910522] RSP: 0018:ffff880035e97b58  EFLAGS: 00010282
[13034.912378] RAX: fffffbfff04a5a94 RBX: ffff880068fe4858 RCX: 0000000000000003
[13034.914339] RDX: dffffc0000000000 RSI: 0000000000000003 RDI: 0000000000000282
[13034.916236] RBP: ffff880035e97b68 R08: 0000000000000001 R09: 0000000000000001
[13034.918229] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[13034.920007] R13: ffff880068fe4858 R14: ffff880068fe4a60 R15: 0000000000001000
[13034.921845] FS:  0000000000000000(0000) GS:ffffffff82247000(0000) knlGS:0000000000000000
[13034.923645] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[13034.925525] CR2: 0000000000000000 CR3: 00000000063dd000 CR4: 00000000001406f0
[13034.932808] Stack:
[13034.934813]  ffff880068fe4780 0000000000001000 ffff880035e97ba8 ffffffffa08800d2
[13034.936675]  ffffffffa088029d ffff880068fe4780 ffff880068fe4858 ffffffffa089c0a0
[13034.938593]  ffff880068fe47e0 ffff88005d59faf0 ffff880035e97be0 ffffffffa087e08f
[13034.940454] Call Trace:
[13034.942388]  [&lt;ffffffffa08800d2&gt;] nfs_readpage_result+0x112/0x200 [nfs]
[13034.944317]  [&lt;ffffffffa088029d&gt;] ? nfs_readpage_done+0xdd/0x160 [nfs]
[13034.946267]  [&lt;ffffffffa087e08f&gt;] nfs_pgio_result+0x9f/0x120 [nfs]
[13034.948166]  [&lt;ffffffffa09266cc&gt;] pnfs_ld_read_done+0x7c/0x1e0 [nfsv4]
[13034.950247]  [&lt;ffffffffa03b07ee&gt;] bl_read_cleanup+0x2e/0x60 [blocklayoutdriver]
[13034.952156]  [&lt;ffffffff810ebf62&gt;] process_one_work+0x412/0x870
[13034.954102]  [&lt;ffffffff810ebe84&gt;] ? process_one_work+0x334/0x870
[13034.955949]  [&lt;ffffffff810ebb50&gt;] ? queue_delayed_work_on+0x40/0x40
[13034.957985]  [&lt;ffffffff810ec441&gt;] worker_thread+0x81/0x6a0
[13034.959817]  [&lt;ffffffff810ec3c0&gt;] ? process_one_work+0x870/0x870
[13034.961785]  [&lt;ffffffff810f43bd&gt;] kthread+0x17d/0x1a0
[13034.963544]  [&lt;ffffffff810f4240&gt;] ? kthread_create_on_node+0x330/0x330
[13034.965479]  [&lt;ffffffff81100428&gt;] ? finish_task_switch+0x88/0x220
[13034.967223]  [&lt;ffffffff810f4240&gt;] ? kthread_create_on_node+0x330/0x330
[13034.968929]  [&lt;ffffffff81b6ae5f&gt;] ret_from_fork+0x3f/0x70
[13034.970534]  [&lt;ffffffff810f4240&gt;] ? kthread_create_on_node+0x330/0x330
[13034.972176] Code: c7 43 50 40 84 0d a0 e8 3d fe 1c e1 48 8d 7b 58 c7 83 e4 00 00 00 00 00 00 00 e8 ca fe 1c e1 4c 8b 63 58 4c 89 e7 e8 be fe 1c e1 &lt;49&gt; 83 3c 24 00 74 12 48 c7 43 50 f0 a2 0e a0 b8 01 00 00 00 5b
[13034.977148] RIP  [&lt;ffffffffa00db372&gt;] rpc_restart_call_prepare+0x62/0x90 [sunrpc]
[13034.978780]  RSP &lt;ffff880035e97b58&gt;
[13034.980399] CR2: 0000000000000000

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix a write performance regression</title>
<updated>2015-10-02T19:43:07Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-10-01T22:38:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fa4592a14ebb3c22a21d846d1e4f65dab7d1a7c'/>
<id>urn:sha1:8fa4592a14ebb3c22a21d846d1e4f65dab7d1a7c</id>
<content type='text'>
If all other conditions in nfs_can_extend_write() are met, and there
are no locks, then we should be able to assume close-to-open semantics
and the ability to extend our write to cover the whole page.

With this patch, the xfstests generic/074 test completes in 242s instead
of &gt;1400s on my test rig.

Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
Cc: Jeff Layton &lt;jlayton@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix up page writeback accounting</title>
<updated>2015-10-02T19:43:07Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-10-01T15:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40f90271a835478e5910dc84f32b8e25885419a4'/>
<id>urn:sha1:40f90271a835478e5910dc84f32b8e25885419a4</id>
<content type='text'>
Currently, we are crediting all the calls to nfs_writepages_callback()
(i.e. the nfs_writepages() callback) to nfs_writepage(). Aside from
being inconsistent with the behaviour of the equivalent readpage/readpages
accounting, this also means that we cannot distinguish between bulk writes
and single page writebacks (which confuses the 'nfsiostat -p' tool).

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Do cleanup before resetting pageio read/write to mds</title>
<updated>2015-09-20T17:46:45Z</updated>
<author>
<name>Kinglong Mee</name>
</author>
<published>2015-09-20T15:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f29b9bba7b08c6b1d6f2cc4cf750b342fc1946c'/>
<id>urn:sha1:6f29b9bba7b08c6b1d6f2cc4cf750b342fc1946c</id>
<content type='text'>
There is a reference leak of layout segment after resetting
pageio read/write to mds.

Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Cc: stable@vger.kernel.org # v4.0+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFS: Rename nfs_commit_unstable_pages() to nfs_write_inode()</title>
<updated>2015-08-17T18:32:32Z</updated>
<author>
<name>Anna Schumaker</name>
</author>
<published>2015-07-13T18:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae09c31f66cc673bb8c64a5dbfdc04ab67f66d7e'/>
<id>urn:sha1:ae09c31f66cc673bb8c64a5dbfdc04ab67f66d7e</id>
<content type='text'>
All nfs_write_inode() does is pass its arguments to
nfs_commit_unstable_pages().  Let's cut out the middle man and have
nfs_write_pages() do the work directly.

Signed-off-by: Anna Schumaker &lt;Anna.Schumaker@Netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4.1/pnfs: Fix atomicity of commit list updates</title>
<updated>2015-08-10T23:08:13Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-07-31T20:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=86d80f973434de24d8a807a92cd59d5ced7bd519'/>
<id>urn:sha1:86d80f973434de24d8a807a92cd59d5ced7bd519</id>
<content type='text'>
pnfs_layout_mark_request_commit() needs to ensure that it adds the
request to the commit list atomically with all the other updates
in order to prevent corruption to buckets[ds_commit_idx].wlseg
due to races with pnfs_generic_clear_request_commit().

Fixes: 338d00cfef07d ("pnfs: Refactor the *_layout_mark_request_commit...")
Cc: stable@vger.kernel.org # v4.0+
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-4.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2015-07-28T16:37:44Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-07-28T16:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8132e08d25a47e2d5156aa2268cd1cd9b0d6c0d'/>
<id>urn:sha1:d8132e08d25a47e2d5156aa2268cd1cd9b0d6c0d</id>
<content type='text'>
Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

  Stable patches:
   - Fix a situation where the client uses the wrong (zero) stateid.
   - Fix a memory leak in nfs_do_recoalesce

  Bugfixes:
   - Plug a memory leak when -&gt;prepare_layoutcommit fails
   - Fix an Oops in the NFSv4 open code
   - Fix a backchannel deadlock
   - Fix a livelock in sunrpc when sendmsg fails due to low memory
     availability
   - Don't revalidate the mapping if both size and change attr are up to
     date
   - Ensure we don't miss a file extension when doing pNFS
   - Several fixes to handle NFSv4.1 sequence operation status bits
     correctly
   - Several pNFS layout return bugfixes"

* tag 'nfs-for-4.2-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (28 commits)
  nfs: Fix an oops caused by using other thread's stack space in ASYNC mode
  nfs: plug memory leak when -&gt;prepare_layoutcommit fails
  SUNRPC: Report TCP errors to the caller
  sunrpc: translate -EAGAIN to -ENOBUFS when socket is writable.
  NFSv4.2: handle NFS-specific llseek errors
  NFS: Don't clear desc-&gt;pg_moreio in nfs_do_recoalesce()
  NFS: Fix a memory leak in nfs_do_recoalesce
  NFS: nfs_mark_for_revalidate should always set NFS_INO_REVAL_PAGECACHE
  NFS: Remove the "NFS_CAP_CHANGE_ATTR" capability
  NFS: Set NFS_INO_REVAL_PAGECACHE if the change attribute is uninitialised
  NFS: Don't revalidate the mapping if both size and change attr are up to date
  NFSv4/pnfs: Ensure we don't miss a file extension
  NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked
  SUNRPC: xprt_complete_bc_request must also decrement the free slot count
  SUNRPC: Fix a backchannel deadlock
  pNFS: Don't throw out valid layout segments
  pNFS: pnfs_roc_drain() fix a race with open
  pNFS: Fix races between return-on-close and layoutreturn.
  pNFS: pnfs_roc_drain should return 'true' when sleeping
  pNFS: Layoutreturn must invalidate all existing layout segments.
  ...
</content>
</entry>
<entry>
<title>NFSv4/pnfs: Ensure we don't miss a file extension</title>
<updated>2015-07-22T21:15:53Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2015-07-06T00:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b83d3de4c18af49800e0b26ae013db4fcf43a4a'/>
<id>urn:sha1:2b83d3de4c18af49800e0b26ae013db4fcf43a4a</id>
<content type='text'>
pNFS writes don't return attributes, however that doesn't mean that we
should ignore the fact that they may be extending the file. This patch
ensures that if a write is seen to extend the file, then we always set
an attribute barrier, and update the cached file size.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
</feed>
