On Fri, Nov 20, 2020 at 12:17:21PM +0800, Anand Jain wrote: > On 10/11/20 7:26 pm, Naohiro Aota wrote: > > + unsigned int flags) > > +{ > > + if (btrfs_is_zoned(fs_info) && (flags & FS_NOCOW_FL)) > > > > + return -EPERM; > > nit: > Should it be -EINVAL instead? I am not sure. May be David can fix > while integrating. IIRC we've discussed that in some previous iteration. EPERM should be interpreted as that it's not permitted right now, but otherwise it is a valid operation/flag. The constraint is the zoned device. As an example: deleting default subvolume is not permitted (EPERM), but otherwise subvolume deletion is a valid operation. So, EINVAL is for invalid combination of parameters or a request for something that does not make sense at all.