From patchwork Mon Sep 30 18:55:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11167177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18FB0912 for ; Mon, 30 Sep 2019 19:01:42 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0159A224EF for ; Mon, 30 Sep 2019 19:01:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0159A224EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 0306A21FAC5; Mon, 30 Sep 2019 11:59:07 -0700 (PDT) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 530065C3B7D for ; Mon, 30 Sep 2019 11:57:17 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id E2E501005863; Mon, 30 Sep 2019 14:56:56 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id E0174BD; Mon, 30 Sep 2019 14:56:56 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Mon, 30 Sep 2019 14:55:19 -0400 Message-Id: <1569869810-23848-61-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569869810-23848-1-git-send-email-jsimmons@infradead.org> References: <1569869810-23848-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 060/151] lustre: lov: allow lov.*.stripe{size, count}=-1 param X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Andreas Dilger Both the lov stripecount and stripeoffset sysfs files allows the value of "-1". Setting it to "-1" to indicate that the filesystem-wide default value should be used. Update the ld_default_* setting to the proper signed type. WC-bug-id: https://jira.whamcloud.com/browse/LU-9611 Lustre-commit: f93276d9a5b5 ("LU-9611 lov: allow lov.*.stripe{size,count}=-1 param") Signed-off-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/27946 Reviewed-by: James Simmons Reviewed-by: Jian Yu Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/lov/lproc_lov.c | 2 +- fs/lustre/obdclass/obd_config.c | 6 +++--- include/uapi/linux/lustre/lustre_idl.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/lustre/lov/lproc_lov.c b/fs/lustre/lov/lproc_lov.c index cfb2744..4fecd4e 100644 --- a/fs/lustre/lov/lproc_lov.c +++ b/fs/lustre/lov/lproc_lov.c @@ -75,7 +75,7 @@ static ssize_t stripeoffset_show(struct kobject *kobj, struct attribute *attr, obd_kset.kobj); struct lov_desc *desc = &dev->u.lov.desc; - return sprintf(buf, "%llu\n", desc->ld_default_stripe_offset); + return sprintf(buf, "%lld\n", desc->ld_default_stripe_offset); } static ssize_t stripeoffset_store(struct kobject *kobj, struct attribute *attr, diff --git a/fs/lustre/obdclass/obd_config.c b/fs/lustre/obdclass/obd_config.c index 26b3e01..1485cc7 100644 --- a/fs/lustre/obdclass/obd_config.c +++ b/fs/lustre/obdclass/obd_config.c @@ -1226,14 +1226,14 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, /* rc = -EINVAL; continue parsing other params */ skip++; } else if (rc < 0) { - CERROR("%s: error writing proc entry '%s': rc = %d\n", + CERROR("%s: error writing parameter '%s': rc = %d\n", prefix, var->name, rc); rc = 0; } else { - CDEBUG(D_CONFIG, "%s.%.*s: Set parameter %.*s=%s\n", + CDEBUG(D_CONFIG, "%s.%.*s: set parameter %.*s\n", lustre_cfg_string(lcfg, 0), (int)strlen(prefix) - 1, prefix, - (int)(sval - key - 1), key, sval); + (int)(sval - key - 1), key); } } diff --git a/include/uapi/linux/lustre/lustre_idl.h b/include/uapi/linux/lustre/lustre_idl.h index 2b585b6..2181386 100644 --- a/include/uapi/linux/lustre/lustre_idl.h +++ b/include/uapi/linux/lustre/lustre_idl.h @@ -2035,10 +2035,10 @@ enum fld_op { struct lov_desc { __u32 ld_tgt_count; /* how many OBD's */ __u32 ld_active_tgt_count; /* how many active */ - __u32 ld_default_stripe_count; /* how many objects are used */ + __s32 ld_default_stripe_count; /* how many objects are used */ __u32 ld_pattern; /* default PATTERN_RAID0 */ - __u64 ld_default_stripe_size; /* in bytes */ - __u64 ld_default_stripe_offset; /* in bytes */ + __u64 ld_default_stripe_size; /* in bytes */ + __s64 ld_default_stripe_offset; /* starting OST index */ __u32 ld_padding_0; /* unused */ __u32 ld_qos_maxage; /* in second */ __u32 ld_padding_1; /* also fix lustre_swab_lov_desc */