two simple but important clones fixes
Subsystems (2)
Two trivial fixes for CLONE for the 4.4 queue. I have another one to allow same file clones, but we'll need to finalize the language for that in the NFSv4 WG first.
PATCH 1/2 nfs: pass on count for CLONE operations
Currently we pass uninitialized stack garbage in the count parameter. The value is usually large enought to clone whole files and thus let simple tests pass, but it makes the tests for range clones very unhappy.
Signed-off-by Christoph Hellwig <[email protected]>
--- fs/nfs/nfs42proc.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/nfs42proc.c +1 -0
@@ -284,6 +284,7 @@ static int _nfs42_proc_clone(struct rpc_message *msg, struct file *src_f, .dst_fh = NFS_FH(dst_inode), .src_offset = src_offset, .dst_offset = dst_offset, + .count = count, .dst_bitmask = server->cache_consistency_bitmask, };struct nfs42_clone_res res = {
Signature · 1 line
1.9.1
PATCH 2/2 nfs: offer native ioctls even if CONFIG_COMPAT is set
In reply to Christoph HellwigWithout this for example 64-bit binaries on typical amd64 distributions would not be able to use ioctls on NFS. For now this only affects clones.
Signed-off-by Christoph Hellwig <[email protected]>
--- fs/nfs/nfs4file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/nfs/nfs4file.c +1 -2
@@ -347,9 +347,8 @@ const struct file_operations nfs4_file_operations = {#endif /* CONFIG_NFS_V4_2 */ .check_flags = nfs_check_flags, .setlease = simple_nosetlease, -#ifdef CONFIG_COMPAT .unlocked_ioctl = nfs4_ioctl, -#else +#ifdef CONFIG_COMPAT .compat_ioctl = nfs4_ioctl,#endif /* CONFIG_COMPAT */ };
Signature · 1 line
1.9.1