Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-24 Thread Anand Jain
Dave, On 08/21/2015 05:45 AM, Dave Chinner wrote: On Thu, Aug 20, 2015 at 03:09:05PM +0800, Anand Jain wrote: (thanks for the off-ML emails from the people who helped me to understand). Dave, looks like you are suggesting something like.. --- +_dmerror_mount_options() +{ +

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-20 Thread Dave Chinner
On Thu, Aug 20, 2015 at 03:09:05PM +0800, Anand Jain wrote: > > (thanks for the off-ML emails from the people who helped me > to understand). > > Dave, > > looks like you are suggesting something like.. > > --- > +_dmerror_mount_options() > +{ > + _scratch_options mount > + e

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-20 Thread Anand Jain
(thanks for the off-ML emails from the people who helped me to understand). Dave, looks like you are suggesting something like.. --- +_dmerror_mount_options() +{ + _scratch_options mount + echo $SCRATCH_OPTIONS $MOUNT_OPTIONS $SELINUX_MOUNT_OPTIONS \ +

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-18 Thread Dave Chinner
On Wed, Aug 19, 2015 at 11:16:10AM +0800, anand jain wrote: > > > >Ok, SCRATCH_OPTIONS might not be the best idea here, so feel free to > >drop it. > > I have dropped $SCRATCH_OPTIONS. (waiting to submit v8). Thanks. > > >However, you've still missed the primary reason I suggested > >_scratch_

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-18 Thread anand jain
Ok, SCRATCH_OPTIONS might not be the best idea here, so feel free to drop it. I have dropped $SCRATCH_OPTIONS. (waiting to submit v8). Thanks. However, you've still missed the primary reason I suggested _scratch_mount_options in the first place: I am shocked. What was missed ? Cheers,

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-18 Thread Dave Chinner
On Tue, Aug 18, 2015 at 12:26:54PM +0800, anand jain wrote: > > Hi Dave, > > All comments accepted thanks. except for this. > > > >>+_mount_dmerror() > >>+{ > >>+ $MOUNT_PROG -t $FSTYP $MOUNT_OPTIONS $DMERROR_DEV $SCRATCH_MNT > >>+} > > > >Should mirror _scratch_mount. > > > >_mount -t $FSTY

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-17 Thread anand jain
Hi Dave, All comments accepted thanks. except for this. +_mount_dmerror() +{ + $MOUNT_PROG -t $FSTYP $MOUNT_OPTIONS $DMERROR_DEV $SCRATCH_MNT +} Should mirror _scratch_mount. _mount -t $FSTYP `_scratch_mount_options` $DMERROR_DEV $SCRATCH_MNT `_scratch_mount_options` also returns

Re: [PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-16 Thread Dave Chinner
On Fri, Aug 14, 2015 at 11:31:43PM +0800, Anand Jain wrote: > From: Anand Jain > > Controlled EIO from the device is achieved using the dm device. > Helper functions are at common/dmerror. > > Broadly steps will include calling _init_dmerror(). > _init_dmerror() will use SCRATCH_DEV to create dm

[PATCH v6 1/3] xfstests: btrfs: add functions to create dm-error device

2015-08-14 Thread Anand Jain
From: Anand Jain Controlled EIO from the device is achieved using the dm device. Helper functions are at common/dmerror. Broadly steps will include calling _init_dmerror(). _init_dmerror() will use SCRATCH_DEV to create dm linear device and assign DMERROR_DEV to /dev/mapper/error-test. When tes