diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2007-12-20 17:58:11 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2008-01-25 18:05:43 -0500 |
commit | 2fbe8d1ebe004425b4f7b8bba345623d2280be82 (patch) | |
tree | 7620954c7a364c41306a3becc0046dd1e235158f /fs/ocfs2/suballoc.c | |
parent | d147b3d630edef1d34de6ea819787a1ac1b8603b (diff) |
ocfs2: Local alloc window size changeable via mount option
Local alloc is a performance optimization in ocfs2 in which a node
takes a window of bits from the global bitmap and then uses that for
all small local allocations. This window size is fixed to 8MB currently.
This patch allows users to specify the window size in MB including
disabling it by passing in 0. If the number specified is too large,
the fs will use the default value of 8MB.
mount -o localalloc=X /dev/sdX /mntpoint
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 4391744e80f8..7e397e2c25dd 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -1516,8 +1516,9 @@ int __ocfs2_claim_clusters(struct ocfs2_super *osb, | |||
1516 | if (min_clusters > (osb->bitmap_cpg - 1)) { | 1516 | if (min_clusters > (osb->bitmap_cpg - 1)) { |
1517 | /* The only paths asking for contiguousness | 1517 | /* The only paths asking for contiguousness |
1518 | * should know about this already. */ | 1518 | * should know about this already. */ |
1519 | mlog(ML_ERROR, "minimum allocation requested exceeds " | 1519 | mlog(ML_ERROR, "minimum allocation requested %u exceeds " |
1520 | "group bitmap size!"); | 1520 | "group bitmap size %u!\n", min_clusters, |
1521 | osb->bitmap_cpg); | ||
1521 | status = -ENOSPC; | 1522 | status = -ENOSPC; |
1522 | goto bail; | 1523 | goto bail; |
1523 | } | 1524 | } |