generic: use mount point instead of device name
authorHugh Dickins <hughd@google.com>
Thu, 18 Feb 2016 23:44:25 +0000 (10:44 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 18 Feb 2016 23:44:25 +0000 (10:44 +1100)
A tmpfs mount does not involve any block device, its $SCRATCH_DEV is
nothing but a place-holder, so apply 'df' or 'stat' to its mount point
$SCRATCH_MNT instead of to $SCRATCH_DEV.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/273

index e5af7f14eea4a4f57a55581408e3809348ff5dcb..0a4a6000bcee23b606d0c580fafe1e56d130cb49 100755 (executable)
@@ -68,7 +68,7 @@ _file_create()
 
        cd $SCRATCH_MNT/origin
 
-       _disksize=`$DF_PROG -B 1 $SCRATCH_DEV | tail -1 | $AWK_PROG '{ print $5 }'`
+       _disksize=`$DF_PROG -B 1 $SCRATCH_MNT | tail -1 | $AWK_PROG '{ print $5 }'`
        _disksize=$(($_disksize / 3))
        _num=$(($_disksize / $count / $threads / 4096))
        _count=$count