From 7e9b79370733945b25c24e09d663b07c3936d10c Mon Sep 17 00:00:00 2001 From: Younger Liu Date: Wed, 11 Sep 2013 14:19:47 -0700 Subject: [PATCH] ocfs2: ac_bits_wanted should be local_alloc_bits when returns -ENOSPC There is an issue in reserving and claiming space for localalloc, When localalloc space is not enough, it would claim space from global_bitmap. And if there is not enough free space in global_bitmap, the size of claiming space would set to half of orignal size and retry. The issue is as follows: osb->local_alloc_bits is set to half of orignal size in ocfs2_recalc_la_window(), but ac->ac_bits_wanted is set to osb->local_alloc_default_bits which is not changed. localalloc always reserves and claims local_alloc_default_bits space and returns ENOSPC. So, ac->ac_bits_wanted should be osb->local_alloc_bits which would be changed. Signed-off-by: Younger Liu Cc: Joel Becker Cc: Mark Fasheh Cc: Jeff Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed