])
#
+# 2.6.35 renamed ext_pblock to ext4_ext_pblock(ex)
+#
+AC_DEFUN([LB_EXT_PBLOCK],
+[AC_MSG_CHECKING([if kernel has ext_pblocks])
+ LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include "$EXT_DIR/ext4_extents.h"
+],[
+ ext_pblock(NULL);
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_EXT_PBLOCK, 1,
+ [kernel has ext_pblocks])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
# LDISKFS_AC_PATCH_PROGRAM
#
# Determine which program should be used to apply the patches to
#include <ext4/ext4_extents.h>
+#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)
/* 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 */
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;
* 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);