]> git.openfabrics.org - ~emulex/infiniband.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)
commit4395e0c4da486f007dcb45b0336427be7ec08ab1
tree3396fecc7f51ee2947133df851bc2a6c8c1cd15c
parentf87c4318af8bd5daec361e436c69f9d71a43b261
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