* [PATCH] generic/175: disable inline data feature for btrfs
@ 2016-10-10 5:06 Wang Xiaoguang
2016-10-10 9:03 ` Anand Jain
2016-10-10 23:09 ` Dave Chinner
0 siblings, 2 replies; 5+ messages in thread
From: Wang Xiaoguang @ 2016-10-10 5:06 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs
For btrfs, if compression is enabled, it may generate inline data for a
blocksize data range, this inline data is stored in fs tree, will not have
a individual extent, try to reflink this data range at a not-zero offset
will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
---
tests/generic/175 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/generic/175 b/tests/generic/175
index 964580c..b3f90dc 100755
--- a/tests/generic/175
+++ b/tests/generic/175
@@ -50,6 +50,13 @@ rm -f "$seqres.full"
echo "Format and mount"
_scratch_mkfs > "$seqres.full" 2>&1
+# For btrfs, if compression is enabled, it may generate inline data for a
+# blocksize data range, this inline data is stored in fs tree, will not have
+# a individual extent, try to reflink this data range at a not-zero offset
+# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
+if [ "$FSTYP" = "btrfs" ]; then
+ export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
+fi
_scratch_mount >> "$seqres.full" 2>&1
testdir="$SCRATCH_MNT/test-$seq"
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/175: disable inline data feature for btrfs
2016-10-10 5:06 [PATCH] generic/175: disable inline data feature for btrfs Wang Xiaoguang
@ 2016-10-10 9:03 ` Anand Jain
2016-10-10 16:31 ` Darrick J. Wong
2016-10-10 23:09 ` Dave Chinner
1 sibling, 1 reply; 5+ messages in thread
From: Anand Jain @ 2016-10-10 9:03 UTC (permalink / raw)
To: Wang Xiaoguang; +Cc: fstests, linux-btrfs
On 10/10/16 13:06, Wang Xiaoguang wrote:
> For btrfs, if compression is enabled, it may generate inline data for a
> blocksize data range, this inline data is stored in fs tree, will not have
> a individual extent, try to reflink this data range at a not-zero offset
> will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
Hm. I didn't get the point of why its not a btrfs bug ?
Thanks, Anand
> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> ---
> tests/generic/175 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/generic/175 b/tests/generic/175
> index 964580c..b3f90dc 100755
> --- a/tests/generic/175
> +++ b/tests/generic/175
> @@ -50,6 +50,13 @@ rm -f "$seqres.full"
>
> echo "Format and mount"
> _scratch_mkfs > "$seqres.full" 2>&1
> +# For btrfs, if compression is enabled, it may generate inline data for a
> +# blocksize data range, this inline data is stored in fs tree, will not have
> +# a individual extent, try to reflink this data range at a not-zero offset
> +# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
> +if [ "$FSTYP" = "btrfs" ]; then
> + export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
> +fi
> _scratch_mount >> "$seqres.full" 2>&1
>
> testdir="$SCRATCH_MNT/test-$seq"
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/175: disable inline data feature for btrfs
2016-10-10 9:03 ` Anand Jain
@ 2016-10-10 16:31 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2016-10-10 16:31 UTC (permalink / raw)
To: Anand Jain; +Cc: Wang Xiaoguang, fstests, linux-btrfs
On Mon, Oct 10, 2016 at 05:03:49PM +0800, Anand Jain wrote:
>
>
> On 10/10/16 13:06, Wang Xiaoguang wrote:
> >For btrfs, if compression is enabled, it may generate inline data for a
> >blocksize data range, this inline data is stored in fs tree, will not have
> >a individual extent, try to reflink this data range at a not-zero offset
> >will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
>
> Hm. I didn't get the point of why its not a btrfs bug ?
/me was wondering about that too -- if you try to reflink an inlinedata
file, the reflink just fails? I guess that's not totally unreasonable
for the normal usecase (reflink copy) since the copy will probably end
up being inlinedata too. OTOH it's a little surprising that reflinking
a portion of a file at a non-zero offset (i.e. non-copy reflink) like
we're doing here doesn't convert the file to non-inline and fails
instead.
--D
>
> Thanks, Anand
>
>
> >Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> >---
> > tests/generic/175 | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> >diff --git a/tests/generic/175 b/tests/generic/175
> >index 964580c..b3f90dc 100755
> >--- a/tests/generic/175
> >+++ b/tests/generic/175
> >@@ -50,6 +50,13 @@ rm -f "$seqres.full"
> >
> > echo "Format and mount"
> > _scratch_mkfs > "$seqres.full" 2>&1
> >+# For btrfs, if compression is enabled, it may generate inline data for a
> >+# blocksize data range, this inline data is stored in fs tree, will not have
> >+# a individual extent, try to reflink this data range at a not-zero offset
> >+# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
> >+if [ "$FSTYP" = "btrfs" ]; then
> >+ export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
> >+fi
> > _scratch_mount >> "$seqres.full" 2>&1
> >
> > testdir="$SCRATCH_MNT/test-$seq"
> >
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/175: disable inline data feature for btrfs
2016-10-10 5:06 [PATCH] generic/175: disable inline data feature for btrfs Wang Xiaoguang
2016-10-10 9:03 ` Anand Jain
@ 2016-10-10 23:09 ` Dave Chinner
2016-10-11 5:30 ` Wang Xiaoguang
1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2016-10-10 23:09 UTC (permalink / raw)
To: Wang Xiaoguang; +Cc: fstests, linux-btrfs
On Mon, Oct 10, 2016 at 01:06:47PM +0800, Wang Xiaoguang wrote:
> For btrfs, if compression is enabled, it may generate inline data for a
> blocksize data range, this inline data is stored in fs tree, will not have
> a individual extent, try to reflink this data range at a not-zero offset
> will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
>
> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
> ---
> tests/generic/175 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/generic/175 b/tests/generic/175
> index 964580c..b3f90dc 100755
> --- a/tests/generic/175
> +++ b/tests/generic/175
> @@ -50,6 +50,13 @@ rm -f "$seqres.full"
>
> echo "Format and mount"
> _scratch_mkfs > "$seqres.full" 2>&1
> +# For btrfs, if compression is enabled, it may generate inline data for a
> +# blocksize data range, this inline data is stored in fs tree, will not have
> +# a individual extent, try to reflink this data range at a not-zero offset
> +# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
> +if [ "$FSTYP" = "btrfs" ]; then
> + export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
> +fi
Can we /please stop/ putting special case code like this in tests?
This is an unsustainable and unmaintainable practice - it's making a
mess of the test code. If there are specific mount options that
needs to be avoided, then add an option to filter them out. e.g.
something like this:
_scratch_options_filter btrfs compress
so that it removes any compression option from the btrfs mount/mkfs
that is run for that test.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] generic/175: disable inline data feature for btrfs
2016-10-10 23:09 ` Dave Chinner
@ 2016-10-11 5:30 ` Wang Xiaoguang
0 siblings, 0 replies; 5+ messages in thread
From: Wang Xiaoguang @ 2016-10-11 5:30 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-btrfs
hi,
On 10/11/2016 07:09 AM, Dave Chinner wrote:
> On Mon, Oct 10, 2016 at 01:06:47PM +0800, Wang Xiaoguang wrote:
>> For btrfs, if compression is enabled, it may generate inline data for a
>> blocksize data range, this inline data is stored in fs tree, will not have
>> a individual extent, try to reflink this data range at a not-zero offset
>> will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
>>
>> Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
>> ---
>> tests/generic/175 | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/generic/175 b/tests/generic/175
>> index 964580c..b3f90dc 100755
>> --- a/tests/generic/175
>> +++ b/tests/generic/175
>> @@ -50,6 +50,13 @@ rm -f "$seqres.full"
>>
>> echo "Format and mount"
>> _scratch_mkfs > "$seqres.full" 2>&1
>> +# For btrfs, if compression is enabled, it may generate inline data for a
>> +# blocksize data range, this inline data is stored in fs tree, will not have
>> +# a individual extent, try to reflink this data range at a not-zero offset
>> +# will return EOPNOTSUPP, so here we disable inline data feature for btrfs.
>> +if [ "$FSTYP" = "btrfs" ]; then
>> + export MOUNT_OPTIONS="-o max_inline=0 $MOUNT_OPTIONS"
>> +fi
> Can we /please stop/ putting special case code like this in tests?
>
> This is an unsustainable and unmaintainable practice - it's making a
> mess of the test code. If there are specific mount options that
> needs to be avoided, then add an option to filter them out. e.g.
> something like this:
>
> _scratch_options_filter btrfs compress
>
> so that it removes any compression option from the btrfs mount/mkfs
> that is run for that test.
OK, I see, thanks.
Regards,
Xiaoguang Wang
>
> Cheers,
>
> Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-11 5:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 5:06 [PATCH] generic/175: disable inline data feature for btrfs Wang Xiaoguang
2016-10-10 9:03 ` Anand Jain
2016-10-10 16:31 ` Darrick J. Wong
2016-10-10 23:09 ` Dave Chinner
2016-10-11 5:30 ` Wang Xiaoguang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox