xfs
[Top] [All Lists]

Re: [PATCH] fix data bug in device-mapping invalidation

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] fix data bug in device-mapping invalidation
From: Stephen Lord <lord@xxxxxxx>
Date: Tue, 07 May 2002 11:08:24 -0500
Cc: linux-xfs@xxxxxxxxxxx
References: <20020504115515.A8210@xxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
Christoph Hellwig wrote:

Currently pagebuf_lock_disable() calls destroy_buffers() and truncate_inode_pages() unconditionally. For the post 2.4.13 case
where the pagebuf modules sits ontop of the blockdevice mapping
this could cause incore data corruption for other openers of that
device (xfsdump?).  The fix is to completly remove the calls,
blkdev_put does them when the last opener finished.

Keep the code for the pre 2.4.13 case as those use their own mapping.
Patch is ontop of my last patch, but the bug is present even without it.

--- linux/fs/xfs/pagebuf/page_buf_locking.c.~hch~       Sat May  4 13:46:55 2002
+++ linux/fs/xfs/pagebuf/page_buf_locking.c     Sat May  4 13:48:33 2002
@@ -324,8 +324,10 @@
pagebuf_lock_disable(                   /* disable buffer locking       */
                     pb_target_t *target)  /* inode for buffers         */
{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,13))
        destroy_buffers(target->pbr_device);
        truncate_inode_pages(PBT_ADDR_SPACE(target), 0LL);
+#endif
        bdput(target->pbr_bdev);
        kmem_cache_free(pagebuf_target_cache, target);


Thanks Christoph, this and your other patches are in my queue - I am bogged down
in an I/O path rewrite at the moment, amongst other things.

Steve




<Prev in Thread] Current Thread [Next in Thread>