X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flvfs%2Ffsfilt_ext3.c;h=d99e0057eed0be78f3bdd047c6c3d88590cb83e2;hb=6a95f4546b50d63b9cf7e97c931f694bc25a9704;hp=d2ff06d2a7ca8b3f55921ca710851a293fdc2205;hpb=bea31adb586aeab93e1c42594dfc0fdabb554349;p=fs%2Flustre-release.git diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index d2ff06d..d99e005 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -60,6 +60,10 @@ #include +#ifdef HAVE_EXT_PBLOCK /* Name changed to ext4_ext_pblock for kernel 2.6.35 */ +#define ext3_ext_pblock(ex) ext_pblock((ex)) +#endif + /* for kernels 2.6.18 and later */ #define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS(sb) @@ -216,7 +220,7 @@ static long ext3_ext_find_goal(struct inode *inode, struct ext3_ext_path *path, /* try to predict block placement */ if ((ex = path[depth].p_ext)) - return ext_pblock(ex) + (block - le32_to_cpu(ex->ee_block)); + return ext4_ext_pblock(ex) + (block - le32_to_cpu(ex->ee_block)); /* it looks index is empty * try to find starting from index itself */ @@ -372,10 +376,10 @@ static int ext3_ext_new_extent_cb(struct ext3_ext_base *base, ext3_mb_discard_inode_preallocations(inode); #endif #ifdef HAVE_EXT_FREE_BLOCK_WITH_BUFFER_HEAD /* Introduced in 2.6.32-rc7 */ - ext3_free_blocks(handle, inode, NULL, ext_pblock(&nex), + ext3_free_blocks(handle, inode, NULL, ext4_ext_pblock(&nex), cpu_to_le16(nex.ee_len), 0); #else - ext3_free_blocks(handle, inode, ext_pblock(&nex), + ext3_free_blocks(handle, inode, ext4_ext_pblock(&nex), cpu_to_le16(nex.ee_len), 0); #endif goto out; @@ -387,7 +391,7 @@ static int ext3_ext_new_extent_cb(struct ext3_ext_base *base, * scaning after that block */ cex->ec_len = le16_to_cpu(nex.ee_len); - cex->ec_start = ext_pblock(&nex); + cex->ec_start = ext4_ext_pblock(&nex); BUG_ON(le16_to_cpu(nex.ee_len) == 0); BUG_ON(le32_to_cpu(nex.ee_block) != cex->ec_block);