diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-05-02 20:25:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-03 07:23:54 +0200 |
commit | 6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (patch) | |
tree | b023d524fb0a3b71aa0b957ce7c5540611497370 /fs/jfs/inode.c | |
parent | [PATCH] JFS: Write journal sync points more often (diff) | |
download | linux-6628465e33ca694bd8fd5c3cf4eb7ff9177bc694.tar.xz linux-6628465e33ca694bd8fd5c3cf4eb7ff9177bc694.zip |
[PATCH] JFS: Don't allocate extents that overlap existing extents
Modify xtSearch so that it returns the next allocated block when the
requested block is unmapped. This can be used to make sure we don't
create a new extent that overlaps the next one.
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 6c04f5eda135..24a689179af2 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -178,7 +178,7 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks, xad_t xad; s64 xaddr; int xflag; - s32 xlen; + s32 xlen = max_blocks; /* * Take appropriate lock on inode @@ -190,7 +190,7 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks, if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && (!xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0)) && - xlen) { + xaddr) { if (xflag & XAD_NOTRECORDED) { if (!create) /* @@ -229,7 +229,7 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks, #ifdef _JFS_4K if ((rc = extHint(ip, lblock64 << ip->i_sb->s_blocksize_bits, &xad))) goto unlock; - rc = extAlloc(ip, max_blocks, lblock64, &xad, FALSE); + rc = extAlloc(ip, xlen, lblock64, &xad, FALSE); if (rc) goto unlock; |