From 33475649e8aca0471d61331fc76f34d713ee57d7 Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 7 Mar 2005 18:56:32 +0000 Subject: [PATCH] Branch: b1_4 Don't try to block map an extent-mapped file if kernel doesn't support extents, return error instead. --- lustre/lvfs/fsfilt_ext3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 4606e25..080d3ad 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -952,13 +952,16 @@ int fsfilt_ext3_map_inode_pages(struct inode *inode, struct page **page, struct semaphore *optional_sem) { int rc; -#ifdef EXT3_MULTIBLOCK_ALLOCATOR if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) { +#ifdef EXT3_MULTIBLOCK_ALLOCATOR rc = fsfilt_ext3_map_ext_inode_pages(inode, page, pages, blocks, created, create); +#else + CERROR("extent-mapped file with unsupported kernel\n"); + rc = -EIO; +#endif return rc; } -#endif if (optional_sem != NULL) down(optional_sem); rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks, -- 1.8.3.1