]> asedeno.scripts.mit.edu Git - linux.git/commit
GFS2: For exhash conversion, only one block is needed
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 8 Jan 2014 11:05:29 +0000 (11:05 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 8 Jan 2014 11:05:29 +0000 (11:05 +0000)
commit22b5a6c0c0cd5eb524d31c949d113c6683e37ec9
tree2beb4ff4d988e191992eed8c42cfc275ae94413e
parent62e96cf81988101fe9e086b2877307b6adda5197
GFS2: For exhash conversion, only one block is needed

For most cases, only a single new block is needed when we reach
the point of converting from stuffed to exhash directory. The
exception being when the file name is so long that it will not
fit within the new leaf block.

So this patch adds a simple test for that situation so that we
do not need to request the full reservation size in this case.

Potentially we could calculate more accurately the value to use
in other cases too, but that is much more complicated to do and
it is doubtful that the benefit would outweigh the extra cost
in code complexity.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/dir.c