]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: send, lower mem requirements for processing xattrs
authorFilipe Manana <fdmanana@suse.com>
Wed, 20 Aug 2014 09:45:45 +0000 (10:45 +0100)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:16 +0000 (13:38 -0700)
commit627f0dde166e3896b366aa9b2ef6fac4a998f1d9
tree3396fecc7f51ee2947133df851bc2a6c8c1cd15c
parent111723f76829291f13eaff49eb9b4c08a1f52000
Btrfs: send, lower mem requirements for processing xattrs

Maximum xattr size can be up to nearly the leaf size. For an fs with a
leaf size larger than the page size, using kmalloc requires allocating
multiple pages that are contiguous, which might not be possible if
there's heavy memory fragmentation. Therefore fallback to vmalloc if
we fail to allocate with kmalloc. Also start with a smaller buffer size,
since xattr values typically are smaller than a page.

Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/send.c