lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <001a01d02a3d$ce7462d0$6b5d2870$@samsung.com>
Date:	Wed, 07 Jan 2015 14:50:13 +0900
From:	Namjae Jeon <namjae.jeon@...sung.com>
To:	'Brian Foster' <bfoster@...hat.com>
Cc:	'Dave Chinner' <david@...morbit.com>,
	'Theodore Ts'o' <tytso@....edu>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	'linux-ext4' <linux-ext4@...r.kernel.org>, xfs@....sgi.com,
	'Ashish Sangwan' <a.sangwan@...sung.com>
Subject: RE: [PATCH v7 9/11] xfstests: generic/043: Test multiple fallocate
 insert/collapse range calls

> > +
> > +for (( BSIZE = 1024; BSIZE <= 4096; BSIZE *= 2 )); do
> > +
> > +	length=$(($BLOCKS * $BSIZE))
> > +	case $FSTYP in
> > +	xfs)
> > +	_scratch_mkfs -b size=$BSIZE >> $seqres.full 2>&1
> > +	;;
> > +	ext4)
> > +	_scratch_mkfs -b $BSIZE >> $seqres.full 2>&1
> > +	;;
> > +	esac
> 
> I think we typically try to define things like blocksize in the test
> configuration. The MKFS_OPTIONS env. var. can be defined with the
> correct options for the associated fs being tested. That eliminates the
> need to loop and for the fs-specific _scratch_mkfs calls above.
Okay, I will change.
> 
> > +	_scratch_mount >> $seqres.full 2>&1
> > +
> > +	# Write file
> > +	$XFS_IO_PROG -f -c "pwrite 0 $length" -c fsync $testfile > /dev/null
> > +
> > +
> > +	# Insert alternate blocks
> 
> Trailing space in the above comment.
> 
> > +	for (( j=0; j < $(($BLOCKS/2)); j++ )); do
> > +		offset=$((($j*$BSIZE)*2))
> > +		$XFS_IO_PROG -c "finsert $offset $BSIZE" $testfile > /dev/null
> > +	done
> > +
> > +	# Check if 100 extents are present
> > +	$XFS_IO_PROG -c "fiemap -v" $testfile | grep "^ *[0-9]*:" |wc -l
> > +
> > +	_check_scratch_fs
> > +	if [ $? -ne 0 ]; then
> > +		status=1
> > +		exit
> > +	fi
> > +
> > +	# Collapse alternate blocks
> 
> ... and here as well.
Okay, I wil fix both points.
> 
> > +	for (( j=0; j < $(($BLOCKS/2)); j++ )); do
> > +		offset=$((($j*$BSIZE)))
> > +		$XFS_IO_PROG -c "fcollapse $offset $BSIZE" $testfile > /dev/null
> > +	done
> > +
> > +	# Check if 1 extents are present
> > +	$XFS_IO_PROG -c "fiemap -v" $testfile | grep "^ *[0-9]*:" |wc -l
> > +
> > +	_check_scratch_fs
> > +	if [ $? -ne 0 ]; then
> > +		status=1
> > +		exit
> > +	fi
> > +
> 
> Maybe create a copy of the original file before we run through the
> insert and collapse sequence and cmp the files here as a last step?
Good idea. I will add your point.

Thanks for your review!
> 
> Brian

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ