Re: [PATCH] ovl: fix incorrect extent info in metacopy case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/25/20 4:35 PM, Amir Goldstein wrote:
On Wed, Jun 24, 2020 at 3:53 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
On Wed, Jun 24, 2020 at 1:23 PM Chengguang Xu <cgxu519@xxxxxxxxxxxx> wrote:
In metacopy case, we should use ovl_inode_realdata() instead of
ovl_inode_real() to get real inode which has data, so that
we can get correct information of extentes in ->fiemap operation.

Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx>
looks right
Miklos,

Not related to this patch, I noticed something that could be odd with
ovl_fiemap().

When passed the flag FIEMAP_FLAG_SYNC, ->fiemap() will trigger writeback
of lower inode pages.

This behavior is border line for overlayfs.
I did not check if filemap_write_and_wait() ends up being a noop on read-only
fs or if it can return an error.

vfs ioctl does the same behavior regardless of read-only fs and IIUC,
writeback functions will do DIRTY tag check before actually sync dirty data.

Thanks,
cgxu

Following ovl_fsync() practice, we may want to silently drop the
FIEMAP_FLAG_SYNC flag? but that could result in unexpected results.

Am I overthinking this?

Thanks,
Amir.




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux