Commit a4a4891164d4f6f383cc17e7c90828a7ca6a1146
Committed by
Mark Fasheh
1 parent
ffda89a3bf
Exists in
master
and in
7 other branches
ocfs2: Add ac_alloc_slot in ocfs2_alloc_context
In inode stealing, we no longer restrict the allocation to happen in the local node. So it is neccessary for us to add a new member in ocfs2_alloc_context to indicate which slot we are using for allocation. We also modify the process of local alloc so that this member can be used there also. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Showing 3 changed files with 4 additions and 0 deletions Side-by-side Diff
fs/ocfs2/localalloc.c
... | ... | @@ -523,6 +523,8 @@ |
523 | 523 | } |
524 | 524 | |
525 | 525 | ac->ac_inode = local_alloc_inode; |
526 | + /* We should never use localalloc from another slot */ | |
527 | + ac->ac_alloc_slot = osb->slot_num; | |
526 | 528 | ac->ac_which = OCFS2_AC_USE_LOCAL; |
527 | 529 | get_bh(osb->local_alloc_bh); |
528 | 530 | ac->ac_bh = osb->local_alloc_bh; |
fs/ocfs2/suballoc.c
fs/ocfs2/suballoc.h
... | ... | @@ -36,6 +36,7 @@ |
36 | 36 | struct ocfs2_alloc_context { |
37 | 37 | struct inode *ac_inode; /* which bitmap are we allocating from? */ |
38 | 38 | struct buffer_head *ac_bh; /* file entry bh */ |
39 | + u32 ac_alloc_slot; /* which slot are we allocating from? */ | |
39 | 40 | u32 ac_bits_wanted; |
40 | 41 | u32 ac_bits_given; |
41 | 42 | #define OCFS2_AC_USE_LOCAL 1 |