Re: [PATCH] src/seek_sanity_test: Fix for filesystems without delayed allocation

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



Eryu,

thanks for the review.

On Thu, May 11, 2017 at 7:58 AM, Eryu Guan <eguan@xxxxxxxxxx> wrote:
> On Wed, May 10, 2017 at 01:46:04PM +0200, Andreas Gruenbacher wrote:
>> src/seek_sanity_test (test generic/285) assumes that after fallocating
>> space in a file, fseek SEEK_HOLE / SEEK_DATA will still report the
>> allocated space as a hole.  This isn't true on filesystems that don't
>> support delayed allocation, so skip the affected tests in that case.
>>
>> Tested on xfs and gfs2 + patches for fseek SEEK_HOLE / SEEK_DATA.
>
> I'm not sure if this is really about delayed allocation, I tried
> nodelalloc mounted ext4, test still passed. And the following test
> reported fallocated space as HOLE, on both delalloc and nodelalloc
> mounted ext4:
>
> [root@bootp-73-5-205 xfstests]# grep vda6 /proc/mounts
> /dev/vda6 /mnt/ext4 ext4 rw,seclabel,relatime,nodelalloc,data=ordered 0 0
> [root@bootp-73-5-205 xfstests]# rm /mnt/ext4/testfile
> [root@bootp-73-5-205 xfstests]# xfs_io -fc "falloc 0 1m" -c "seek -h 0" -c "seek -d 0" /mnt/ext4/testfile
> Whence  Result
> HOLE    0
> Whence  Result
> DATA    EOF
> [root@bootp-73-5-205 xfstests]# mount -o remount,delalloc /mnt/ext4
> [root@bootp-73-5-205 xfstests]# grep vda6 /proc/mounts
> /dev/vda6 /mnt/ext4 ext4 rw,seclabel,relatime,data=ordered 0 0
> [root@bootp-73-5-205 xfstests]# rm /mnt/ext4/testfile
> [root@bootp-73-5-205 xfstests]# xfs_io -fc "falloc 0 1m" -c "seek -h 0" -c "seek -d 0" /mnt/ext4/testfile
> Whence  Result
> HOLE    0
> Whence  Result
> DATA    EOF
>
> I noticed that test07/8/9 are the only three that test unwritten
> extents, perhaps not supporting unwritten extents are the reason?

You are right, unwritten extents is the correct term for that
particular technique. I noticed that some additional error checking
makes sense as well, so I'll repost.

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



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux