From patchwork Wed May 3 10:54:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 9709395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B084060387 for ; Wed, 3 May 2017 10:55:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A317A28427 for ; Wed, 3 May 2017 10:55:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9828B285E9; Wed, 3 May 2017 10:55:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41264285E8 for ; Wed, 3 May 2017 10:55:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbdECKzR (ORCPT ); Wed, 3 May 2017 06:55:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:56961 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752843AbdECKyS (ORCPT ); Wed, 3 May 2017 06:54:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 76820AB5F; Wed, 3 May 2017 10:54:16 +0000 (UTC) Received: from localhost (hermes.olymp [local]) by hermes.olymp (OpenSMTPD) with ESMTPA id edeb1004; Wed, 3 May 2017 10:54:14 +0000 (UTC) From: Luis Henriques To: fstests@vger.kernel.org Cc: ceph-devel@vger.kernel.org, Luis Henriques Subject: [PATCH] fstests: attr: add support for cephfs Date: Wed, 3 May 2017 11:54:13 +0100 Message-Id: <20170503105413.8314-1-lhenriques@suse.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- common/attr | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) -- 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 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