Re: [RFC][PATCH v2 4/4] vfs: wrap write f_ops with file_{start,end}_write()
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2017-01-27 11:17:30
Also in:
linux-fsdevel
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2017-01-27 11:17:30
Also in:
linux-fsdevel
On Mon, Jan 23, 2017 at 8:43 PM, Amir Goldstein [off-list ref] wrote:
Before calling write f_ops, call file_start_write() instead
of sb_start_write().
This ensures freeze protection for both overlay and upper fs
when file is open from an overlayfs mount.
Replace {sb,file}_start_write() for {copy,clone}_file_range() and
for fallocate().
For dedup_file_range() there is no need for mnt_want_write_file().
File is already open for write, so we already have mnt_want_write()
and we only need file_start_write().Being opened for write is not verified if capable(CAP_SYS_ADMIN). Ugly special case, don't ask me why it's done... Thanks, Miklos