diff mbox

Reiser4 initial implementation

Message ID alpine.LNX.2.00.1412152315300.21847@reiser4.gekom (mailing list archive)
State New, archived
Headers show

Commit Message

Dushan Tcholich Dec. 15, 2014, 10:19 p.m. UTC
This is initial xfstests implementation for Reiser4 filesystem.

Signed-off-by: Dushan Tcholich <dusanc@gmail.com>

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

Comments

Dave Chinner Dec. 15, 2014, 9:06 p.m. UTC | #1
On Mon, Dec 15, 2014 at 11:19:43PM +0100, Dushan Tcholich wrote:
> 
> This is initial xfstests implementation for Reiser4 filesystem.
> 

Policy question to the wider audience: should we support out of tree
filesystems in fstests? I can't verify the patches nor maintain
support for such filesystems, nor is there a wide developer or
distro demand for testing such filesystems. If there's only one or
two developers that need support for reiser4, then it might be best
for to maintain the xfstests patches out of tree, too.

What does everyone think?

> Signed-off-by: Dushan Tcholich <dusanc@gmail.com>
> 
> --- xfstests.orig/common/rc	2014-12-14 15:17:59.000000000 +0100
> +++ xfstests/common/rc	2014-12-15 19:40:36.000000000 +0100
> @@ -622,7 +622,7 @@
>      xfs)
>  	def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
>  	;;
> -    ext2|ext3|ext4|ext4dev|udf|btrfs)
> +    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
>  	def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
>  	;;
>      esac
> @@ -640,6 +640,7 @@
>      fi
>  
>      blocks=`expr $fssize / $blocksize`
> +    fssizeK=`expr $fssize / 1024`K

Is mkfs.resier4 really unable to take a byte or block size count for
the filesystem size?

>  
>      if [ "$HOSTOS" == "Linux" ]; then
>  	devsize=`blockdev --getsize64 $SCRATCH_DEV`
> @@ -665,6 +666,9 @@
>      btrfs)
>  	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
>  	;;
> +    reiser4)
> +        ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV $fssizeK 
> +        ;;

You need to add support for MKFS_REISER4_PROG, etc. into
common/config

>      *)
>  	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
>  	;;
> 
> --- xfstests.orig/common/config	2014-12-14 15:17:59.000000000 +0100
> +++ xfstests/common/config	2014-12-12 13:27:40.000000000 +0100
> @@ -258,6 +256,9 @@
>  		# acls & xattrs aren't turned on by default on reiserfs
>  		export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
>  		;;
> +	reiser4)
> +		export MOUNT_OPTIONS=$REISER4_MOUNT_OPTIONS
> +		;;
>  	gfs2)
>  		# acls aren't turned on by default on gfs2
>  		export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
> @@ -302,6 +303,9 @@
>  	reiserfs)
>  		export MKFS_OPTIONS="$REISERFS_MKFS_OPTIONS -q"
>  		;;
> +	reiser4)
> +                export MKFS_OPTIONS=$REISER4_MKFS_OPTIONS
> +                ;;

whitespae damage.

>  	gfs2)
>  		export MKFS_OPTIONS="$GFS2_MKFS_OPTIONS -O -p lock_nolock"
>  		;;
> @@ -322,6 +326,9 @@
>  	reiserfs)
>  		export FSCK_OPTIONS="--yes"
>  		;;
> +	reiser4)
> +                export FSCK_OPTIONS="--yes"
> +                ;;

Whitespace damage. You could also just do:

-	reiserfs)
+	reiser*)

You also need to add the setup checks to the top of common/rc (i.e
after the "check for correct setup" comment).

Cheers,

Dave.
Eric Sandeen Dec. 15, 2014, 9:39 p.m. UTC | #2
On 12/15/14 3:06 PM, Dave Chinner wrote:
> On Mon, Dec 15, 2014 at 11:19:43PM +0100, Dushan Tcholich wrote:
>>
>> This is initial xfstests implementation for Reiser4 filesystem.
>>
> 
> Policy question to the wider audience: should we support out of tree
> filesystems in fstests? I can't verify the patches nor maintain
> support for such filesystems, nor is there a wide developer or
> distro demand for testing such filesystems. If there's only one or
> two developers that need support for reiser4, then it might be best
> for to maintain the xfstests patches out of tree, too.
> 
> What does everyone think?

I think you have your hands completely full with in-tree filesystems,
and opening the door to many new tests for out-of-tree filesystems could
lead to Too Much Work.

But simply adding the simple things in this patch to make generic tests
work seems fairly harmless; it should be a one-shot deal, with no ongoing load.
So from where I sit I don't see a big problem with a patch like this.

Adding a lot of reiser4 specific tests is probably a different question,
though.

In theory it shouldn't be hard for out-of-tree filesystems to maintain
their own tree of tests which could just drop in under tests/ right?

-Eric

>> Signed-off-by: Dushan Tcholich <dusanc@gmail.com>
>>
>> --- xfstests.orig/common/rc	2014-12-14 15:17:59.000000000 +0100
>> +++ xfstests/common/rc	2014-12-15 19:40:36.000000000 +0100
>> @@ -622,7 +622,7 @@
>>      xfs)
>>  	def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
>>  	;;
>> -    ext2|ext3|ext4|ext4dev|udf|btrfs)
>> +    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
>>  	def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
>>  	;;
>>      esac
>> @@ -640,6 +640,7 @@
>>      fi
>>  
>>      blocks=`expr $fssize / $blocksize`
>> +    fssizeK=`expr $fssize / 1024`K
> 
> Is mkfs.resier4 really unable to take a byte or block size count for
> the filesystem size?
> 
>>  
>>      if [ "$HOSTOS" == "Linux" ]; then
>>  	devsize=`blockdev --getsize64 $SCRATCH_DEV`
>> @@ -665,6 +666,9 @@
>>      btrfs)
>>  	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
>>  	;;
>> +    reiser4)
>> +        ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV $fssizeK 
>> +        ;;
> 
> You need to add support for MKFS_REISER4_PROG, etc. into
> common/config
> 
>>      *)
>>  	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
>>  	;;
>>
>> --- xfstests.orig/common/config	2014-12-14 15:17:59.000000000 +0100
>> +++ xfstests/common/config	2014-12-12 13:27:40.000000000 +0100
>> @@ -258,6 +256,9 @@
>>  		# acls & xattrs aren't turned on by default on reiserfs
>>  		export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
>>  		;;
>> +	reiser4)
>> +		export MOUNT_OPTIONS=$REISER4_MOUNT_OPTIONS
>> +		;;
>>  	gfs2)
>>  		# acls aren't turned on by default on gfs2
>>  		export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
>> @@ -302,6 +303,9 @@
>>  	reiserfs)
>>  		export MKFS_OPTIONS="$REISERFS_MKFS_OPTIONS -q"
>>  		;;
>> +	reiser4)
>> +                export MKFS_OPTIONS=$REISER4_MKFS_OPTIONS
>> +                ;;
> 
> whitespae damage.
> 
>>  	gfs2)
>>  		export MKFS_OPTIONS="$GFS2_MKFS_OPTIONS -O -p lock_nolock"
>>  		;;
>> @@ -322,6 +326,9 @@
>>  	reiserfs)
>>  		export FSCK_OPTIONS="--yes"
>>  		;;
>> +	reiser4)
>> +                export FSCK_OPTIONS="--yes"
>> +                ;;
> 
> Whitespace damage. You could also just do:
> 
> -	reiserfs)
> +	reiser*)
> 
> You also need to add the setup checks to the top of common/rc (i.e
> after the "check for correct setup" comment).
> 
> Cheers,
> 
> Dave.
> 

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Chinner Dec. 15, 2014, 11:18 p.m. UTC | #3
On Mon, Dec 15, 2014 at 03:39:17PM -0600, Eric Sandeen wrote:
> On 12/15/14 3:06 PM, Dave Chinner wrote:
> > On Mon, Dec 15, 2014 at 11:19:43PM +0100, Dushan Tcholich wrote:
> >>
> >> This is initial xfstests implementation for Reiser4 filesystem.
> >>
> > 
> > Policy question to the wider audience: should we support out of tree
> > filesystems in fstests? I can't verify the patches nor maintain
> > support for such filesystems, nor is there a wide developer or
> > distro demand for testing such filesystems. If there's only one or
> > two developers that need support for reiser4, then it might be best
> > for to maintain the xfstests patches out of tree, too.
> > 
> > What does everyone think?
> 
> I think you have your hands completely full with in-tree filesystems,
> and opening the door to many new tests for out-of-tree filesystems could
> lead to Too Much Work.
> 
> But simply adding the simple things in this patch to make generic tests
> work seems fairly harmless; it should be a one-shot deal, with no ongoing load.
> So from where I sit I don't see a big problem with a patch like this.

That seems fair enough, though I do wonder if we should try to
structure the common code to make it easier to add/maintain support
like this.

> Adding a lot of reiser4 specific tests is probably a different question,
> though.

Yup, and that's my main concern.

> In theory it shouldn't be hard for out-of-tree filesystems to maintain
> their own tree of tests which could just drop in under tests/ right?

Yes, the high level scripts source fs specific tests from
tests/$FSTYP, so such test directories would be easy to maintain as
out of tree patches.

Cheers,

Dave.
Dushan Tcholich Dec. 15, 2014, 11:30 p.m. UTC | #4
On Tue, Dec 16, 2014 at 12:18 AM, Dave Chinner <david@fromorbit.com> wrote:
> On Mon, Dec 15, 2014 at 03:39:17PM -0600, Eric Sandeen wrote:
>> On 12/15/14 3:06 PM, Dave Chinner wrote:
>> > On Mon, Dec 15, 2014 at 11:19:43PM +0100, Dushan Tcholich wrote:
>> >>
>> >> This is initial xfstests implementation for Reiser4 filesystem.
>> >>
>> >
>> > Policy question to the wider audience: should we support out of tree
>> > filesystems in fstests? I can't verify the patches nor maintain
>> > support for such filesystems, nor is there a wide developer or
>> > distro demand for testing such filesystems. If there's only one or
>> > two developers that need support for reiser4, then it might be best
>> > for to maintain the xfstests patches out of tree, too.
>> >
>> > What does everyone think?
>>
>> I think you have your hands completely full with in-tree filesystems,
>> and opening the door to many new tests for out-of-tree filesystems could
>> lead to Too Much Work.
>>
>> But simply adding the simple things in this patch to make generic tests
>> work seems fairly harmless; it should be a one-shot deal, with no ongoing load.
>> So from where I sit I don't see a big problem with a patch like this.
>
> That seems fair enough, though I do wonder if we should try to
> structure the common code to make it easier to add/maintain support
> like this.
>
>> Adding a lot of reiser4 specific tests is probably a different question,
>> though.
>
> Yup, and that's my main concern.
>

There won't be any specific tests until it gets in mainline.

>> In theory it shouldn't be hard for out-of-tree filesystems to maintain
>> their own tree of tests which could just drop in under tests/ right?
>
> Yes, the high level scripts source fs specific tests from
> tests/$FSTYP, so such test directories would be easy to maintain as
> out of tree patches.
>
I agree with this.

> Cheers,
>
> Dave.
>
> --
> Dave Chinner
> david@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- xfstests.orig/common/rc	2014-12-14 15:17:59.000000000 +0100
+++ xfstests/common/rc	2014-12-15 19:40:36.000000000 +0100
@@ -622,7 +622,7 @@ 
     xfs)
 	def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
 	;;
-    ext2|ext3|ext4|ext4dev|udf|btrfs)
+    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
 	def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
 	;;
     esac
@@ -640,6 +640,7 @@ 
     fi
 
     blocks=`expr $fssize / $blocksize`
+    fssizeK=`expr $fssize / 1024`K
 
     if [ "$HOSTOS" == "Linux" ]; then
 	devsize=`blockdev --getsize64 $SCRATCH_DEV`
@@ -665,6 +666,9 @@ 
     btrfs)
 	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
 	;;
+    reiser4)
+        ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV $fssizeK 
+        ;;
     *)
 	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
 	;;

--- xfstests.orig/common/config	2014-12-14 15:17:59.000000000 +0100
+++ xfstests/common/config	2014-12-12 13:27:40.000000000 +0100
@@ -258,6 +256,9 @@ 
 		# acls & xattrs aren't turned on by default on reiserfs
 		export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
 		;;
+	reiser4)
+		export MOUNT_OPTIONS=$REISER4_MOUNT_OPTIONS
+		;;
 	gfs2)
 		# acls aren't turned on by default on gfs2
 		export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
@@ -302,6 +303,9 @@ 
 	reiserfs)
 		export MKFS_OPTIONS="$REISERFS_MKFS_OPTIONS -q"
 		;;
+	reiser4)
+                export MKFS_OPTIONS=$REISER4_MKFS_OPTIONS
+                ;;
 	gfs2)
 		export MKFS_OPTIONS="$GFS2_MKFS_OPTIONS -O -p lock_nolock"
 		;;
@@ -322,6 +326,9 @@ 
 	reiserfs)
 		export FSCK_OPTIONS="--yes"
 		;;
+	reiser4)
+                export FSCK_OPTIONS="--yes"
+                ;;
 	*)
 		export FSCK_OPTIONS="-n"
 		;;