2.4: Fix ext3 panic due to ll_rw_block behaviour after illegal block access.

2.4: Fix ext3 panic due to ll_rw_block behaviour after illegal block access.

Post by Stephen Tweedi » Wed, 26 Mar 2003 19:50:12



It is really rude to clear all the buffer state bits on an access
beyond end-of-device.  It can panic filesystems which have internal
state bits, for example.  Just clear the dirty flag instead, and leave
the others intact.

--- linux-2.4-ext3push/drivers/block/ll_rw_blk.c.=K0000=.orig   2003-03-25 10:59:15.000000000 +0000

                if (maxsector < count || maxsector - count < sector) {
                        /* Yecch */
-                       bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
+                       bh->b_state &= ~(1 << BH_Dirty);

                        /* This may well happen - the kernel calls bread()

                               kdevname(bh->b_rdev), rw,
                               (sector + count)>>1, minorsize);

-                       /* Yecch again */
                        bh->b_end_io(bh, 0);
                        return;
                }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.4: Minor build fix for ext3 (2.4 and 2.5)


If you have ext2_fs.h and ext3_fs.h included at the same time,
we are missing one define used in ext3_should_journal_data() and
ext3_should_order_data() as part of the test_opt() macro (which
defaults to the ext2 definition if both are present).

--- linux-2.4-ext3push/include/linux/ext3_fs.h.=K0006=.orig     2003-03-25 10:59:15.000000000 +0000

 #else
 #define EXT2_MOUNT_NOLOAD              EXT3_MOUNT_NOLOAD
 #define EXT2_MOUNT_ABORT               EXT3_MOUNT_ABORT
+#define EXT2_MOUNT_DATA_FLAGS          EXT3_MOUNT_DATA_FLAGS
 #endif

 #define ext3_set_bit                   ext2_set_bit
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Monitors and Video Cards

3. Solaris 2.4 panic: free: freeing free block

4. X w/ stealth 32 and sony 20in???

5. 2.4.20-pre4/ext3: Performance fix for O_SYNC behaviour

6. RPL Boot

7. NFS PANIC and FIX in 2.4

8. 2.0.0 Total lockup from cua2

9. PROBLEM: Kernel Panics because of sync() and IO ressources, Supposed to be fixed in 2.4.5pre9 ?

10. Behaviour of access(x, X_OK) in 2.2 vs. 2.4

11. URGENT: Blocking Access By IP on Solaris 2.4

12. ll_rw_block: device 08:02: Only 4096-char blocks implemented (1024)

13. 2.4 iget5_locked port attempt to 2.4 (supposedly fixed NFS version this time)