[linux-lvm] Re: Unable to get XFS, ext3, reiserfs & LVM to coexist happily

Eric Sandeen sandeen at sgi.com
Wed Jan 9 16:25:01 UTC 2002


On Tue, 2002-01-01 at 21:51, Adrian Head wrote:

> I'm starting to play around with LVM with the goal of having XFS, ext3, 
> reiserfs and LVM coexist nicely together.  
> 
> Has anyone been able to get , ext3, reiserfs, XFS and LVM running nicely 
> together?  

This patch, on top of xfs cvs (2.4.17-xfs), with the LVM 1.0.1 upgrade
patch applied, then the VFS lock patch, works for me.  Note that this is
stolen from the 1.0.1rc4(ish) version of LVM in Linus' kernel.  It uses
the built-in blocks from lv_snap->lv_iobuf->blocks rather than declaring
a new chunk of blocks.

I tested snapshot creation & overflow with ext2, ext3, reiser, and xfs. 
I have not looked closely enough to see why xfs breaks w/o this patch,
and why it works with it, but... give it a shot.

-Eric

-- 
Eric Sandeen      XFS for Linux     http://oss.sgi.com/projects/xfs
sandeen at sgi.com   SGI, Inc.
-------------- next part --------------
--- lvm-snap.c	Wed Jan  9 16:10:01 2002
+++ /localhome/eric/lvm-1.0.1-works/lvm-snap.c	Wed Jan  9 16:07:52 2002
@@ -349,7 +349,6 @@
 	unsigned long phys_start;
 	int idx = lv_snap->lv_remap_ptr, chunk_size = lv_snap->lv_chunk_size;
 	struct kiobuf * iobuf;
-	unsigned long blocks[KIO_MAX_SECTORS];
 	int blksize_snap, blksize_org, min_blksize, max_blksize;
 	int max_sectors, nr_sectors;
 
@@ -400,19 +399,19 @@
 
 		iobuf->length = nr_sectors << 9;
 
-		if (!lvm_snapshot_prepare_blocks(blocks, phys_start,
+		if (!lvm_snapshot_prepare_blocks(iobuf->blocks, phys_start,
 						 nr_sectors, blksize_org))
 			goto fail_prepare;
 
-		if (__brw_kiovec(READ, 1, &iobuf, org_phys_dev, blocks,
+		if (__brw_kiovec(READ, 1, &iobuf, org_phys_dev, iobuf->blocks,
 				 blksize_org, lv_snap) != (nr_sectors<<9))
 			goto fail_raw_read;
 
-		if (!lvm_snapshot_prepare_blocks(blocks, snap_start,
+		if (!lvm_snapshot_prepare_blocks(iobuf->blocks, snap_start,
 						 nr_sectors, blksize_snap))
 			goto fail_prepare;
 
-		if (__brw_kiovec(WRITE, 1, &iobuf, snap_phys_dev, blocks,
+		if (__brw_kiovec(WRITE, 1, &iobuf, snap_phys_dev, iobuf->blocks,
 				 blksize_snap, lv_snap) != (nr_sectors<<9))
 			goto fail_raw_write;
 


More information about the linux-lvm mailing list