From patchwork Thu Feb 27 21:09:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11409903 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 4C7D4138D for ; Thu, 27 Feb 2020 21:25:18 +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 34CC3246A0 for ; Thu, 27 Feb 2020 21:25:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34CC3246A0 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 65D95348E20; Thu, 27 Feb 2020 13:22:46 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 902B521F982 for ; Thu, 27 Feb 2020 13:18:56 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id C243E1058; Thu, 27 Feb 2020 16:18:14 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id BFB7346D; Thu, 27 Feb 2020 16:18:14 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:09:57 -0500 Message-Id: <1582838290-17243-130-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 129/622] lustre: llite: create checksums to replace checksum_pages 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: James Simmons , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" Create llite.*.checksums, which matches llite.*.checksum_pages in functionality. Now the llite layer have something that matches osc.*.checksums. In time we can retire checksum_pages and change it to its original purpose of enabling per-page checksums (which was not implemented in the CLIO development). WC-bug-id: https://jira.whamcloud.com/browse/LU-10906 Lustre-commit: 123ee3cf96dd ("LU-10906 llite: create checksums to replace checksum_pages") Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/33222 Reviewed-by: Andreas Dilger Reviewed-by: Li Xi Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/llite/lproc_llite.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/lustre/llite/lproc_llite.c b/fs/lustre/llite/lproc_llite.c index 5ac6689..5fc7705 100644 --- a/fs/lustre/llite/lproc_llite.c +++ b/fs/lustre/llite/lproc_llite.c @@ -599,8 +599,8 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, LPROC_SEQ_FOPS(ll_max_cached_mb); -static ssize_t checksum_pages_show(struct kobject *kobj, struct attribute *attr, - char *buf) +static ssize_t checksums_show(struct kobject *kobj, struct attribute *attr, + char *buf) { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kset.kobj); @@ -608,10 +608,8 @@ static ssize_t checksum_pages_show(struct kobject *kobj, struct attribute *attr, return sprintf(buf, "%u\n", (sbi->ll_flags & LL_SBI_CHECKSUM) ? 1 : 0); } -static ssize_t checksum_pages_store(struct kobject *kobj, - struct attribute *attr, - const char *buffer, - size_t count) +static ssize_t checksums_store(struct kobject *kobj, struct attribute *attr, + const char *buffer, size_t count) { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kset.kobj); @@ -642,7 +640,9 @@ static ssize_t checksum_pages_store(struct kobject *kobj, return count; } -LUSTRE_RW_ATTR(checksum_pages); +LUSTRE_RW_ATTR(checksums); + +LUSTRE_ATTR(checksum_pages, 0644, checksums_show, checksums_store); static ssize_t ll_rd_track_id(struct kobject *kobj, char *buf, enum stats_track_type type) @@ -1250,6 +1250,7 @@ static ssize_t ll_nosquash_nids_seq_write(struct file *file, &lustre_attr_max_read_ahead_mb.attr, &lustre_attr_max_read_ahead_per_file_mb.attr, &lustre_attr_max_read_ahead_whole_mb.attr, + &lustre_attr_checksums.attr, &lustre_attr_checksum_pages.attr, &lustre_attr_stats_track_pid.attr, &lustre_attr_stats_track_ppid.attr,