* [PATCH] fstests: attr: add support for cephfs
@ 2017-05-03 10:54 Luis Henriques
2017-05-04 3:23 ` Eryu Guan
0 siblings, 1 reply; 6+ messages in thread
From: Luis Henriques @ 2017-05-03 10:54 UTC (permalink / raw)
To: fstests; +Cc: ceph-devel, Luis Henriques
Block size for cephfs is 4M, which makes generic/020 test fail as the
value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
two variables to sane values for this FSTYP.
Signed-off-by: Luis Henriques <lhenriques@suse.com>
---
common/attr | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/common/attr b/common/attr
index ac139e618b2a..c840ce42a1fa 100644
--- a/common/attr
+++ b/common/attr
@@ -254,26 +254,36 @@ _sort_getfattr_output()
}
# set maximum total attr space based on fs type
-if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "pvfs2" ]; then
+case "$FSTYP" in
+xfs|udf|pvfs2|ceph)
MAX_ATTRS=1000
-else # Assume max ~1 block of attrs
+ ;;
+*)
+ # Assume max ~1 block of attrs
BLOCK_SIZE=`_get_block_size $TEST_DIR`
# user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
let MAX_ATTRS=$BLOCK_SIZE/40
-fi
+esac
export MAX_ATTRS
# Set max attr value size based on fs type
-if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
+case "$FSTYP" in
+xfs|udf|btrfs)
MAX_ATTRVAL_SIZE=64
-elif [ "$FSTYP" == "pvfs2" ]; then
+ ;;
+pvfs2)
MAX_ATTRVAL_SIZE=8192
-else # Assume max ~1 block of attrs
+ ;;
+ceph)
+ MAX_ATTRVAL_SIZE=65536
+ ;;
+*)
+ # Assume max ~1 block of attrs
BLOCK_SIZE=`_get_block_size $TEST_DIR`
# leave a little overhead
let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
-fi
+esac
export MAX_ATTRVAL_SIZE
# make sure this script returns success
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: attr: add support for cephfs
2017-05-03 10:54 [PATCH] fstests: attr: add support for cephfs Luis Henriques
@ 2017-05-04 3:23 ` Eryu Guan
2017-05-04 3:44 ` Yan, Zheng
0 siblings, 1 reply; 6+ messages in thread
From: Eryu Guan @ 2017-05-04 3:23 UTC (permalink / raw)
To: Luis Henriques; +Cc: fstests, ceph-devel
On Wed, May 03, 2017 at 11:54:13AM +0100, Luis Henriques wrote:
> Block size for cephfs is 4M, which makes generic/020 test fail as the
> value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
> two variables to sane values for this FSTYP.
>
> Signed-off-by: Luis Henriques <lhenriques@suse.com>
Thanks for the patch! I'd like some reviews from ceph developers on the
ceph MAX_ATTRS and MAX_ATTRVAL_SIZE numbers.
Thanks,
Eryu
> ---
> common/attr | 24 +++++++++++++++++-------
> 1 file changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/common/attr b/common/attr
> index ac139e618b2a..c840ce42a1fa 100644
> --- a/common/attr
> +++ b/common/attr
> @@ -254,26 +254,36 @@ _sort_getfattr_output()
> }
>
> # set maximum total attr space based on fs type
> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "pvfs2" ]; then
> +case "$FSTYP" in
> +xfs|udf|pvfs2|ceph)
> MAX_ATTRS=1000
> -else # Assume max ~1 block of attrs
> + ;;
> +*)
> + # Assume max ~1 block of attrs
> BLOCK_SIZE=`_get_block_size $TEST_DIR`
> # user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
> let MAX_ATTRS=$BLOCK_SIZE/40
> -fi
> +esac
>
> export MAX_ATTRS
>
> # Set max attr value size based on fs type
> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
> +case "$FSTYP" in
> +xfs|udf|btrfs)
> MAX_ATTRVAL_SIZE=64
> -elif [ "$FSTYP" == "pvfs2" ]; then
> + ;;
> +pvfs2)
> MAX_ATTRVAL_SIZE=8192
> -else # Assume max ~1 block of attrs
> + ;;
> +ceph)
> + MAX_ATTRVAL_SIZE=65536
> + ;;
> +*)
> + # Assume max ~1 block of attrs
> BLOCK_SIZE=`_get_block_size $TEST_DIR`
> # leave a little overhead
> let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
> -fi
> +esac
>
> export MAX_ATTRVAL_SIZE
> # make sure this script returns success
> --
> 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] 6+ messages in thread
* Re: [PATCH] fstests: attr: add support for cephfs
2017-05-04 3:23 ` Eryu Guan
@ 2017-05-04 3:44 ` Yan, Zheng
2017-05-04 5:00 ` Eryu Guan
2017-05-04 9:29 ` Luis Henriques
0 siblings, 2 replies; 6+ messages in thread
From: Yan, Zheng @ 2017-05-04 3:44 UTC (permalink / raw)
To: Eryu Guan; +Cc: Luis Henriques, fstests, ceph-devel
On Thu, May 4, 2017 at 11:23 AM, Eryu Guan <eguan@redhat.com> wrote:
> On Wed, May 03, 2017 at 11:54:13AM +0100, Luis Henriques wrote:
>> Block size for cephfs is 4M, which makes generic/020 test fail as the
>> value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
>> two variables to sane values for this FSTYP.
>>
>> Signed-off-by: Luis Henriques <lhenriques@suse.com>
>
> Thanks for the patch! I'd like some reviews from ceph developers on the
> ceph MAX_ATTRS and MAX_ATTRVAL_SIZE numbers.
>
Currently we don't have any limitation on single xattr size and number
of xattrs. But single xattr size is limited to 65536 by kernel.
Regards
Yan, Zheng
> Thanks,
> Eryu
>
>> ---
>> common/attr | 24 +++++++++++++++++-------
>> 1 file changed, 17 insertions(+), 7 deletions(-)
>>
>> diff --git a/common/attr b/common/attr
>> index ac139e618b2a..c840ce42a1fa 100644
>> --- a/common/attr
>> +++ b/common/attr
>> @@ -254,26 +254,36 @@ _sort_getfattr_output()
>> }
>>
>> # set maximum total attr space based on fs type
>> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "pvfs2" ]; then
>> +case "$FSTYP" in
>> +xfs|udf|pvfs2|ceph)
>> MAX_ATTRS=1000
>> -else # Assume max ~1 block of attrs
>> + ;;
>> +*)
>> + # Assume max ~1 block of attrs
>> BLOCK_SIZE=`_get_block_size $TEST_DIR`
>> # user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
>> let MAX_ATTRS=$BLOCK_SIZE/40
>> -fi
>> +esac
>>
>> export MAX_ATTRS
>>
>> # Set max attr value size based on fs type
>> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
>> +case "$FSTYP" in
>> +xfs|udf|btrfs)
>> MAX_ATTRVAL_SIZE=64
>> -elif [ "$FSTYP" == "pvfs2" ]; then
>> + ;;
>> +pvfs2)
>> MAX_ATTRVAL_SIZE=8192
>> -else # Assume max ~1 block of attrs
>> + ;;
>> +ceph)
>> + MAX_ATTRVAL_SIZE=65536
>> + ;;
>> +*)
>> + # Assume max ~1 block of attrs
>> BLOCK_SIZE=`_get_block_size $TEST_DIR`
>> # leave a little overhead
>> let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
>> -fi
>> +esac
>>
>> export MAX_ATTRVAL_SIZE
>> # make sure this script returns success
>> --
>> 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
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" 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] 6+ messages in thread
* Re: [PATCH] fstests: attr: add support for cephfs
2017-05-04 3:44 ` Yan, Zheng
@ 2017-05-04 5:00 ` Eryu Guan
[not found] ` <CAAM7YA=rCf_y1r8+SwWL9rpjEnFrfBg5Y6oQMqokXuH7-PPHsw@mail.gmail.com>
2017-05-04 9:29 ` Luis Henriques
1 sibling, 1 reply; 6+ messages in thread
From: Eryu Guan @ 2017-05-04 5:00 UTC (permalink / raw)
To: Yan, Zheng; +Cc: Luis Henriques, fstests, ceph-devel
On Thu, May 04, 2017 at 11:44:46AM +0800, Yan, Zheng wrote:
> On Thu, May 4, 2017 at 11:23 AM, Eryu Guan <eguan@redhat.com> wrote:
> > On Wed, May 03, 2017 at 11:54:13AM +0100, Luis Henriques wrote:
> >> Block size for cephfs is 4M, which makes generic/020 test fail as the
> >> value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
> >> two variables to sane values for this FSTYP.
> >>
> >> Signed-off-by: Luis Henriques <lhenriques@suse.com>
> >
> > Thanks for the patch! I'd like some reviews from ceph developers on the
> > ceph MAX_ATTRS and MAX_ATTRVAL_SIZE numbers.
> >
>
> Currently we don't have any limitation on single xattr size and number
> of xattrs. But single xattr size is limited to 65536 by kernel.
Thanks! Can I take it as a Reviewed-by tag?
Eryu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: attr: add support for cephfs
[not found] ` <CAAM7YA=rCf_y1r8+SwWL9rpjEnFrfBg5Y6oQMqokXuH7-PPHsw@mail.gmail.com>
@ 2017-05-04 7:57 ` Eryu Guan
0 siblings, 0 replies; 6+ messages in thread
From: Eryu Guan @ 2017-05-04 7:57 UTC (permalink / raw)
To: Yan, Zheng; +Cc: fstests
[cc'ed fstests list]
On Thu, May 04, 2017 at 03:49:27PM +0800, Yan, Zheng wrote:
> On Thu, May 4, 2017 at 1:00 PM, Eryu Guan <eguan@redhat.com> wrote:
> > On Thu, May 04, 2017 at 11:44:46AM +0800, Yan, Zheng wrote:
> >> On Thu, May 4, 2017 at 11:23 AM, Eryu Guan <eguan@redhat.com> wrote:
> >> > On Wed, May 03, 2017 at 11:54:13AM +0100, Luis Henriques wrote:
> >> >> Block size for cephfs is 4M, which makes generic/020 test fail as the
> >> >> value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
> >> >> two variables to sane values for this FSTYP.
> >> >>
> >> >> Signed-off-by: Luis Henriques <lhenriques@suse.com>
> >> >
> >> > Thanks for the patch! I'd like some reviews from ceph developers on the
> >> > ceph MAX_ATTRS and MAX_ATTRVAL_SIZE numbers.
> >> >
> >>
> >> Currently we don't have any limitation on single xattr size and number
> >> of xattrs. But single xattr size is limited to 65536 by kernel.
> >
> > Thanks! Can I take it as a Reviewed-by tag?
>
>
> yes
Thanks!
Eryu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fstests: attr: add support for cephfs
2017-05-04 3:44 ` Yan, Zheng
2017-05-04 5:00 ` Eryu Guan
@ 2017-05-04 9:29 ` Luis Henriques
1 sibling, 0 replies; 6+ messages in thread
From: Luis Henriques @ 2017-05-04 9:29 UTC (permalink / raw)
To: Yan, Zheng; +Cc: Eryu Guan, fstests, ceph-devel
On Thu, May 04, 2017 at 11:44:46AM +0800, Yan, Zheng wrote:
> On Thu, May 4, 2017 at 11:23 AM, Eryu Guan <eguan@redhat.com> wrote:
> > On Wed, May 03, 2017 at 11:54:13AM +0100, Luis Henriques wrote:
> >> Block size for cephfs is 4M, which makes generic/020 test fail as the
> >> value for MAX_ATTRS and MAX_ATTRVAL_SIZE will be too high. Restrict these
> >> two variables to sane values for this FSTYP.
> >>
> >> Signed-off-by: Luis Henriques <lhenriques@suse.com>
> >
> > Thanks for the patch! I'd like some reviews from ceph developers on the
> > ceph MAX_ATTRS and MAX_ATTRVAL_SIZE numbers.
> >
>
> Currently we don't have any limitation on single xattr size and number
> of xattrs. But single xattr size is limited to 65536 by kernel.
Right, and the same limit is also applied when trying to list (listxattr)
more than XATTR_LIST_MAX bytes. One of the failures in the generic/020
test was because it was getting a -E2BIG in getfattr.
Cheers,
--
Luís
>
> Regards
> Yan, Zheng
>
> > Thanks,
> > Eryu
> >
> >> ---
> >> common/attr | 24 +++++++++++++++++-------
> >> 1 file changed, 17 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/common/attr b/common/attr
> >> index ac139e618b2a..c840ce42a1fa 100644
> >> --- a/common/attr
> >> +++ b/common/attr
> >> @@ -254,26 +254,36 @@ _sort_getfattr_output()
> >> }
> >>
> >> # set maximum total attr space based on fs type
> >> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "pvfs2" ]; then
> >> +case "$FSTYP" in
> >> +xfs|udf|pvfs2|ceph)
> >> MAX_ATTRS=1000
> >> -else # Assume max ~1 block of attrs
> >> + ;;
> >> +*)
> >> + # Assume max ~1 block of attrs
> >> BLOCK_SIZE=`_get_block_size $TEST_DIR`
> >> # user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
> >> let MAX_ATTRS=$BLOCK_SIZE/40
> >> -fi
> >> +esac
> >>
> >> export MAX_ATTRS
> >>
> >> # Set max attr value size based on fs type
> >> -if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
> >> +case "$FSTYP" in
> >> +xfs|udf|btrfs)
> >> MAX_ATTRVAL_SIZE=64
> >> -elif [ "$FSTYP" == "pvfs2" ]; then
> >> + ;;
> >> +pvfs2)
> >> MAX_ATTRVAL_SIZE=8192
> >> -else # Assume max ~1 block of attrs
> >> + ;;
> >> +ceph)
> >> + MAX_ATTRVAL_SIZE=65536
> >> + ;;
> >> +*)
> >> + # Assume max ~1 block of attrs
> >> BLOCK_SIZE=`_get_block_size $TEST_DIR`
> >> # leave a little overhead
> >> let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
> >> -fi
> >> +esac
> >>
> >> export MAX_ATTRVAL_SIZE
> >> # make sure this script returns success
> >> --
> >> 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
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" 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] 6+ messages in thread
end of thread, other threads:[~2017-05-04 9:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 10:54 [PATCH] fstests: attr: add support for cephfs Luis Henriques
2017-05-04 3:23 ` Eryu Guan
2017-05-04 3:44 ` Yan, Zheng
2017-05-04 5:00 ` Eryu Guan
[not found] ` <CAAM7YA=rCf_y1r8+SwWL9rpjEnFrfBg5Y6oQMqokXuH7-PPHsw@mail.gmail.com>
2017-05-04 7:57 ` Eryu Guan
2017-05-04 9:29 ` Luis Henriques
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.