Re: [PATCH] ext4: Ensure zeroout blocks have no dirty metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-12-10, at 10:28, Curt Wohlgemuth wrote:
This fixes a bug in which new blocks returned from an extent created with
ext4_ext_zeroout() can have dirty metadata still associated with them.

This is for the problem I reported on 23 Nov ("Bug in extent zeroout: blocks not marked as new"). I'm not seeing the corruption with this fix that I was
seeing without it.

@@ -2474,9 +2474,21 @@ static int ext4_ext_zeroout(struct inode
+		/* On success, we need to insure all metadata associated
+		 * with each of these blocks is unmapped. */
+		if (test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+			sector_t block = ee_pblock;
+
			ret = 0;
+			done = 0;
+			while (done < len) {
+				unmap_underlying_metadata(inode->i_sb->s_bdev,


IIRC, during the discussion of this problem, Ted pointed out that this can only happen if the filesystem is running in no-journal mode. Otherwise, there are shadow allocation bitmaps that prevent metadata blocks from being reallocated until the transaction that released them has committed.

In that case, it makes sense to only do this extra work if the filesystem is running in no-journal mode.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux