On 01/28/2017 05:20 AM, Amir Goldstein wrote: > On Fri, Jan 27, 2017 at 1:50 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: >> On Fri, Jan 27, 2017 at 1:09 PM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote: >>> On Mon, Jan 23, 2017 at 8:43 PM, Amir Goldstein <amir73il@xxxxxxxxx> 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... >>> >> >> Christoph, Darrick, is that by design? > > Anyway, whether is makes sense or not, that's a legacy from > BTRFS_IOC_FILE_EXTENT_SAME, we probably have to live with. > > Michael, I recon man page needs updating. Sorry--can you elaborate on what changes are required? Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html