diff options
| author | Ronnie Sahlberg <lsahlber@redhat.com> | 2022-02-23 11:14:16 +1000 | 
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2022-03-18 23:06:06 -0500 | 
| commit | 84330d41efb12bc227899e54dbdbe7d9590cb2b7 (patch) | |
| tree | 33daee729f9ebc734034dd4bc77a79914f0d8482 /scripts/gdb/linux/device.py | |
| parent | 47178c7722ac528ea08aa82c3ef9ffa178962d7a (diff) | |
cifs: truncate the inode and mapping when we simulate fcollapse
RHBZ:1997367
When we collapse a range in smb3_collapse_range() we must make sure
we update the inode size and pagecache accordingly.
If not, both inode size and pagecahce may be stale until it is refreshed.
This can be demonstrated for the inode size by running :
xfs_io -i -f -c "truncate 320k" -c "fcollapse 64k 128k" -c "fiemap -v"  \
/mnt/testfile
where we can see the result of stale data in the fiemap output.
The third line of the output is wrong, all this data should be truncated.
 EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
   0: [0..127]:        hole               128
   1: [128..383]:      128..383           256   0x1
   2: [384..639]:      hole               256
And the correct output, when the inode size has been updated correctly should
look like this:
 EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
   0: [0..127]:        hole               128
   1: [128..383]:      128..383           256   0x1
Reported-by: Xiaoli Feng <xifeng@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions
