Re: [PATCH 3/3] 289: Test that filesystem sends discard requests only on free sectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/2012 03:45 AM, Tomas Racek wrote:
This is done by comparing free sectors reported by some FS utility
(dumpe2fs/xfs_db) and actual discard commands sent to device obtained
via blk tracer in debugfs.

Currently supported FS are ext[34], xfs; device with discard support is
not required, the test creates loop device for this purpose.

Signed-off-by: Tomas Racek <tracek@xxxxxxxxxx>
---
  289     | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  289.out |   5 ++
  group   |   1 +
  3 files changed, 175 insertions(+)
  create mode 100755 289
  create mode 100644 289.out



This will not work for 3.x kernels, but they 2.6 and 3.x both use the same path.

+debugfs=$($MOUNT_PROG | grep debugfs | cut -d " " -f3)
+[ -n $debugfs ] || _notrun "This test requires mounted debugfs"

As you use $debugfs quite a bit from here on, suggest doing something like:

debugfs=/sys/kernel/debug
if [ ! -d $debugfs ]; then
   _notrun "This test requires mounted debugfs"
fi

Other than that it looks great.


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux