aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/inode.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-05-02 14:25:13 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 01:23:54 -0400
commit6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (patch)
treeb023d524fb0a3b71aa0b957ce7c5540611497370 /fs/jfs/inode.c
parent1c6278295d6482edaaaef5faa64b18f17b3319b7 (diff)
[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.c6
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,
178 xad_t xad; 178 xad_t xad;
179 s64 xaddr; 179 s64 xaddr;
180 int xflag; 180 int xflag;
181 s32 xlen; 181 s32 xlen = max_blocks;
182 182
183 /* 183 /*
184 * Take appropriate lock on inode 184 * Take appropriate lock on inode
@@ -190,7 +190,7 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks,
190 190
191 if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && 191 if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) &&
192 (!xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0)) && 192 (!xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0)) &&
193 xlen) { 193 xaddr) {
194 if (xflag & XAD_NOTRECORDED) { 194 if (xflag & XAD_NOTRECORDED) {
195 if (!create) 195 if (!create)
196 /* 196 /*
@@ -229,7 +229,7 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks,
229#ifdef _JFS_4K 229#ifdef _JFS_4K
230 if ((rc = extHint(ip, lblock64 << ip->i_sb->s_blocksize_bits, &xad))) 230 if ((rc = extHint(ip, lblock64 << ip->i_sb->s_blocksize_bits, &xad)))
231 goto unlock; 231 goto unlock;
232 rc = extAlloc(ip, max_blocks, lblock64, &xad, FALSE); 232 rc = extAlloc(ip, xlen, lblock64, &xad, FALSE);
233 if (rc) 233 if (rc)
234 goto unlock; 234 goto unlock;
235 235