ocfs2: make xattr extension work with new local alloc reservation.
commit92f61d8a31e270f9391e7bcc0ac638bd4262a8e0
authorTao Ma <tao.ma@oracle.com>
Fri, 9 Jul 2010 06:53:11 +0000 (9 14:53 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:30:24 +0000 (2 10:30 -0700)
treed78b688e62a6abab980aa269cfc94c94fbcb5217
parent0ebeb757aa82ef2b3bdeb2002b663f5cb3e37006
ocfs2: make xattr extension work with new local alloc reservation.

commit a78f9f4668949a6588b8872f162e86685c63d023 upstream.

The old ocfs2_xattr_extent_allocation is too optimistic about
the clusters we can get. So actually if the file system is
too fragmented, ocfs2_add_clusters_in_btree will return us
with EGAIN and we need to allocate clusters once again.

So this patch change it to a while loop so that we can allocate
clusters until we reach clusters_to_add.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ocfs2/xattr.c