Re: [PATCH v4] Btrfs: send, lower mem requirements for processing xattrs

2014-08-19 Thread David Sterba
On Mon, Aug 11, 2014 at 03:09:35AM +0100, Filipe Manana wrote: + if (name_len + data_len buf_len) { + buf_len = name_len + data_len; + if (is_vmalloc_addr(buf)) { + vfree(buf); + buf =

[PATCH v4] Btrfs: send, lower mem requirements for processing xattrs

2014-08-10 Thread Filipe Manana
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