]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: send, use the right limits for xattr names and values
authorFilipe Manana <fdmanana@gmail.com>
Fri, 23 May 2014 19:15:16 +0000 (20:15 +0100)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:21:00 +0000 (17:21 -0700)
commit46fbf284e1a41c89c4c020a45427dfb65a028df6
tree4c8081e117a47dc5f0185b179bc2956e2ac6f40c
parent8bbd8dffb110426174cbb710d994ad8fba02778c
Btrfs: send, use the right limits for xattr names and values

We were limiting the sum of the xattr name and value lengths to PATH_MAX,
which is not correct, specially on filesystems created with btrfs-progs
v3.12 or higher, where the default leaf size is max(16384, PAGE_SIZE), or
systems with page sizes larger than 4096 bytes.

Xattrs have their own specific maximum name and value lengths, which depend
on the leaf size, therefore use these limits to be able to send xattrs with
sizes larger than PATH_MAX.

A test case for xfstests follows.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/send.c