]> 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)
commit6f927af659f4a69b2b13e314e630c14d88ff952e
tree3396fecc7f51ee2947133df851bc2a6c8c1cd15c
parent0a6ca519eb1657fc9f10c3fceef9d134f3474eda
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