lkml.org 
[lkml]   [2022]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -next 1/2] nfs: nfs{,4}_file_flush should consume writeback error
Date
On Sat, 2022-03-05 at 20:46 +0800, ChenXiaoSong wrote:
> filemap_sample_wb_err() will return 0 if nobody has seen the error
> yet,
> then filemap_check_wb_err() will return the unchanged writeback
> error.
>
> Reproducer:
>         nfs server               |       nfs client
>  --------------------------------|-----------------------------------
> ------------
>  # No space left on server       |
>  fallocate -l 100G /server/file1 |
>                                  | mount -t nfs $nfs_server_ip:/ /mnt
>                                  | # Expected error: No space left on
> device
>                                  | dd if=/dev/zero of=/mnt/file2
> count=1 ibs=100K
>  # Release space on server       |
>  rm /server/file1                |
>                                  | # Unexpected error: No space left
> on device
>                                  | dd if=/dev/zero of=/mnt/file2
> count=1 ibs=100K
>

'rm' doesn't open any files or do any I/O, so it shouldn't be returning
any errors from the page cache.

IOW: The problem here is not that we're failing to clear an error from
the page cache. It is that something in 'rm' is checking the page cache
and returning any errors that it finds there.

Is 'rm' perhaps doing a stat() on the file it is deleting? If so, does
this patch fix the bug?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/comm
it/?id=d19e0183a883

--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com


\
 
 \ /
  Last update: 2022-03-05 17:55    [W:0.354 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site