From patchwork Sun Oct 3 19:22:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545317 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: by 2002:ac2:43cd:0:0:0:0:0 with SMTP id u13csp3163874lfl; Sun, 3 Oct 2021 12:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWRwphA3uw+f4+yqI7sH77FVtKU5RtRDP/VubTLSYtSQoLLz6Exho9xkgDqxl5wfz1CuRC X-Received: by 2002:a05:6402:141:: with SMTP id s1mr13184454edu.317.1633288967017; Sun, 03 Oct 2021 12:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288967; cv=none; d=google.com; s=arc-20160816; b=IKFA4lOx5y5NicZMRl5dL8sbAOiuQndEmgLvuLIvr5w5ouLirjx/sJ5idaD0rJ9KbB J5DDF0u9RK9wBf/NrLu7+BrzU5tq9SS+mhWElhfVmPN0I/4x/NcCn8iLK6cU6K14c1g3 vZReazYRcpBpaWaNN7egqmXgPXPpDgeNEBkPdJpv9aY5r1BpS/C0LZYkZACsVClTbK77 7PQNOVh52CiSi3TMo1NO5pQZPIOeQMz0+ZrmkIw1jyiTnuVVFJ0A9XmN+hcIk/KBDOwJ WnDd/I0rioVue+YxmP1elRLUiK3w6EMI3MXr11G5XqlbGMTxrEk6VWhbnIxHafyWSO2H D+qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=VFX7mcJmelNZkcGtRifMrydaq1RQePTWlfkaUPFu//s=; b=HlLJihAc1SPWwKLUAadZZFlHMLGEtPrVLDJqAOxF/gKSRyj3dKs/76QasrnRdYRPth OxOsqIt1BQHIIToLL48U0Pe+X9Zpie3s3w6HtY6M/T84PQ16cvDmWBVKfCEzXlNcVZ6C HuJUPFX5IB4h9uaKEzwOxreXP0asnSbTo4Np/CYXlLWe1O5510d3JAEtVA9jVnDrUzgi E4enebdQ/uFPAFQBqhTWX5o8HD6squjelj87LmMpkwkfUuSmRcyLF8ulvIJ09rhGFkud 5NjfaBoDemm5d2WKUbe5LYuYgiGaB4jNIRsQFH94PgBDp8crzNFKWc4l8ZztI6XDM94d iLVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com. [207.211.31.81]) by mx.google.com with ESMTPS id b9si17128135ede.235.2021.10.03.12.22.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-mt1C3JQBMxWXXFPS8ZPKLg-1; Sun, 03 Oct 2021 15:22:45 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BB965721D for ; Sun, 3 Oct 2021 19:22:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 47DA65F4EC; Sun, 3 Oct 2021 19:22:44 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC8F65F4E8; Sun, 3 Oct 2021 19:22:43 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 1/7] NFS: Fixup patch 3/8 of fscache-iter-3 v2 Date: Sun, 3 Oct 2021 15:22:32 -0400 Message-Id: <1633288958-8481-2-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: Handle failed return values of fscache_fallback_read_page() in switch statement. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 5b0e78742444..d3efb8ba4fb7 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -345,11 +345,6 @@ int __nfs_readpage_from_fscache(struct inode *inode, struct page *page) } ret = fscache_fallback_read_page(nfs_i_fscache(inode), page); - if (ret < 0) { - dfprintk(FSCACHE, "NFS: readpage_from_fscache: " - "fscache_fallback_read_page failed ret = %d\n", ret); - return ret; - } switch (ret) { case 0: /* Read completed synchronously */ @@ -363,7 +358,7 @@ int __nfs_readpage_from_fscache(struct inode *inode, struct page *page) case -ENODATA: /* page not in cache */ nfs_inc_fscache_stats(inode, NFSIOS_FSCACHE_PAGES_READ_FAIL); dfprintk(FSCACHE, - "NFS: readpage_from_fscache %d\n", ret); + "NFS: readpage_from_fscache failed %d\n", ret); SetPageChecked(page); return 1; From patchwork Sun Oct 3 19:22:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545329 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Google-Smtp-Source: ABdhPJwCc4uAI1NCAU3INCQoq0Z0FkWgz1HMDGLZ9/isqqaCS1ICTTYr2B8XQIIYbnvqteAajtIm X-Received: by 2002:a50:bf4a:: with SMTP id g10mr13170184edk.11.1633288979511; Sun, 03 Oct 2021 12:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288979; cv=none; d=google.com; s=arc-20160816; b=fq8Sn+eE8zyrPRVTc+nFQpfwN4pDyr153GsSuz17OwMWcezmESHAV/nKY64BFeqmst Kp4jvu7VHX9326ASbx2P4rdUngeu4hooM6OR7VPiow6H1/iYtCTHnUqPs3mvvI0/Kh8k EwNC9oZF+NpQlTW/Ns48+W2kvkHGsAqUifeAeY1UbZziueQ/ncBdWEzZpxRrPm3IjFNk wsC8NZNmOMVQTthmHsZ/egYVyrhGMm3XufP5c5zdQ3KU6NoNkKxwqAqqpKtfLRrwe5AB r0kGpeHGPS4qxIcA/QhioipETJz8HC604QuqkFakjTk7wu5t9uUG1yz9jTkEO54BRuhJ NI2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=V45i+FwReE6kj3/yFzuyX5hCruxHTg+35FI4Ypm3l6I=; b=e3fU3Yyob8r6Q4MiRalft0mxVTn2Cdu1lQPXkQorTpLZgeQYn71mROdDBh3M7wdQof NjowLtPoogREuefNaqHBpv/KwISxvdu6Z6JJaPpEOLXgztz9k+vvrwP0k0p+OQDX5wDd JY2HrP9PxqOhwzi7tfbBxMfXe3wojGARnbTklqY9cEHBivFcKGtO8T6dBYazpqL/c+vQ PWuyJRE+u+xZWQV4KlhWSKm5B0qbrE3WkysKnQzxslrFZXQnmB4NOnPleCJ0g5kuDYZe LR0+v016ihOp02oTMVPXqRrzeR/K+Tgrg16CeY9UcvsJoI4snA3TLyIz6azrZUOoTX6p n9lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [205.139.110.120]) by mx.google.com with ESMTPS id j8si7044526eds.480.2021.10.03.12.22.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:59 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-400-SItzs9vvMwOOGJdqXCxOng-1; Sun, 03 Oct 2021 15:22:45 -0400 X-MC-Unique: SItzs9vvMwOOGJdqXCxOng-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10BD15721E for ; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0CAE65F4EC; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 72E9E5F4E9; Sun, 3 Oct 2021 19:22:44 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 2/7] NFS: Use nfs_i_fscache() consistently within NFS fscache code Date: Sun, 3 Oct 2021 15:22:33 -0400 Message-Id: <1633288958-8481-3-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: The nfs_i_fscache() is the API defined to check whether fscache is enabled on an NFS inode or not, so use it consistently through the code. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h index 679055720dae..f4deea2908e9 100644 --- a/fs/nfs/fscache.h +++ b/fs/nfs/fscache.h @@ -105,7 +105,7 @@ extern void __nfs_read_completion_to_fscache(struct nfs_pgio_header *hdr, static inline int nfs_readpage_from_fscache(struct inode *inode, struct page *page) { - if (NFS_I(inode)->fscache) + if (nfs_i_fscache(inode)) return __nfs_readpage_from_fscache(inode, page); return -ENOBUFS; } @@ -117,7 +117,7 @@ static inline int nfs_readpage_from_fscache(struct inode *inode, static inline void nfs_readpage_to_fscache(struct inode *inode, struct page *page) { - if (NFS_I(inode)->fscache) + if (nfs_i_fscache(inode)) __nfs_readpage_to_fscache(inode, page); } @@ -126,7 +126,7 @@ static inline void nfs_readpage_to_fscache(struct inode *inode, */ static inline void nfs_fscache_invalidate(struct inode *inode) { - fscache_invalidate(NFS_I(inode)->fscache); + fscache_invalidate(nfs_i_fscache(inode)); } /* @@ -134,7 +134,7 @@ static inline void nfs_fscache_invalidate(struct inode *inode) */ static inline void nfs_fscache_wait_on_invalidate(struct inode *inode) { - fscache_wait_on_invalidate(NFS_I(inode)->fscache); + fscache_wait_on_invalidate(nfs_i_fscache(inode)); } /* From patchwork Sun Oct 3 19:22:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545319 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Google-Smtp-Source: ABdhPJwgMkdiTauYu+oieIS4qmAPC3QThXjnASMTenellKmNg41mab2+9sEQDcYu5pACvsiWz0WD X-Received: by 2002:a05:6402:450:: with SMTP id p16mr13007643edw.162.1633288969291; Sun, 03 Oct 2021 12:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288969; cv=none; d=google.com; s=arc-20160816; b=W5Jm/J03z/BgfqACEEiQwFeOkZClRpZv9nvpgZzTMHt8E31YVosP0ZfhonUqiBKz97 4YgOut0wQiwvjcSVsX+dD2yjoJFZGQ8neMOtZKNcS9jXdiJ9oSsXALwq/emFrML8K0Ou IYYOmItsRKK7ETe0/jQmdIbcd8fyVpJuHs0gzCxU5WzMarBy37a3XtpgceMLEkoZ25Bz 862ORI8htJuSDkSC+aQv5RYeH6ySMyW0XtysJKs/86Eg0ICPYNJphVx4mda4vNcUNu/f zZGCy6+J8bJiSHRPdNNv7Gjw2/GIulH7/0WpsZU+58LV0ES/BLFzG6e1mLfgCcJnokzx d0tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=s/ZfeZOjZZzrckKpwSqT/AHynvj4PLjMOpapX/6qlPw=; b=C0K/13MDOjwCagxrcfpblJrRb6moVXNnPVEzCi9sD0XCFqIcC3iAmCaVHqbXcrpRZP g6TREvv4EdqG/bIvx+sHAKTqITGr0YM++nHS1ZJ3Np+YkZIr+75Gkmz53BWk2NuhEwIQ gaBx9m0odtZTQmoOn5Ca3KcjUjdAlErG1s+mVyOZDsdnewyqECntrny98SXCV4qnOGHq P3GdXfSr+bWmP8PhPCD+hDosU/5mkei9XZerTh2RWtYqmDhNB64wUdQUgoaj0ldhOHZm rsGmE2flU9HRLM8TA43p6dwg1XT7NWzE7HVK3IP+6jWiQOeikEf3YSqo7XAsWDnEui2v H7tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com. [205.139.110.61]) by mx.google.com with ESMTPS id gn42si3504465ejc.441.2021.10.03.12.22.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-vK5sNePDO8WjVvJ6pD8TkQ-1; Sun, 03 Oct 2021 15:22:47 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CAE9D802C9B for ; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C71465F4E9; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 326135F4E8; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 3/7] NFS: Cleanup usage of nfs_inode in fscache interface and handle i_size properly Date: Sun, 3 Oct 2021 15:22:34 -0400 Message-Id: <1633288958-8481-4-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dwysocha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: A number of places in the fscache interface used nfs_inode when inode could be used, simplifying the code. Also, handle the read of i_size properly by utilizing the i_size_read() interface. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index d3efb8ba4fb7..8f17fda5b8c9 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -226,16 +226,16 @@ void nfs_fscache_release_super_cookie(struct super_block *sb) } static void nfs_fscache_update_auxdata(struct nfs_fscache_inode_auxdata *auxdata, - struct nfs_inode *nfsi) + struct inode *inode) { memset(auxdata, 0, sizeof(*auxdata)); - auxdata->mtime_sec = nfsi->vfs_inode.i_mtime.tv_sec; - auxdata->mtime_nsec = nfsi->vfs_inode.i_mtime.tv_nsec; - auxdata->ctime_sec = nfsi->vfs_inode.i_ctime.tv_sec; - auxdata->ctime_nsec = nfsi->vfs_inode.i_ctime.tv_nsec; + auxdata->mtime_sec = inode->i_mtime.tv_sec; + auxdata->mtime_nsec = inode->i_mtime.tv_nsec; + auxdata->ctime_sec = inode->i_ctime.tv_sec; + auxdata->ctime_nsec = inode->i_ctime.tv_nsec; - if (NFS_SERVER(&nfsi->vfs_inode)->nfs_client->rpc_ops->version == 4) - auxdata->change_attr = inode_peek_iversion_raw(&nfsi->vfs_inode); + if (NFS_SERVER(inode)->nfs_client->rpc_ops->version == 4) + auxdata->change_attr = inode_peek_iversion_raw(inode); } /* @@ -251,13 +251,13 @@ void nfs_fscache_init_inode(struct inode *inode) if (!(nfss->fscache && S_ISREG(inode->i_mode))) return; - nfs_fscache_update_auxdata(&auxdata, nfsi); + nfs_fscache_update_auxdata(&auxdata, inode); nfsi->fscache = fscache_acquire_cookie(NFS_SB(inode->i_sb)->fscache, &nfs_fscache_inode_object_def, nfsi->fh.data, nfsi->fh.size, &auxdata, sizeof(auxdata), - nfsi, nfsi->vfs_inode.i_size, false); + nfsi, i_size_read(inode), false); } /* @@ -271,7 +271,7 @@ void nfs_fscache_clear_inode(struct inode *inode) dfprintk(FSCACHE, "NFS: clear cookie (0x%p/0x%p)\n", nfsi, cookie); - nfs_fscache_update_auxdata(&auxdata, nfsi); + nfs_fscache_update_auxdata(&auxdata, inode); fscache_relinquish_cookie(cookie, &auxdata, false); nfsi->fscache = NULL; } @@ -311,7 +311,7 @@ void nfs_fscache_open_file(struct inode *inode, struct file *filp) if (!fscache_cookie_valid(cookie)) return; - nfs_fscache_update_auxdata(&auxdata, nfsi); + nfs_fscache_update_auxdata(&auxdata, inode); if (inode_is_open_for_write(inode)) { dfprintk(FSCACHE, "NFS: nfsi 0x%p disabling cache\n", nfsi); @@ -319,7 +319,7 @@ void nfs_fscache_open_file(struct inode *inode, struct file *filp) fscache_disable_cookie(cookie, &auxdata, true); } else { dfprintk(FSCACHE, "NFS: nfsi 0x%p enabling cache\n", nfsi); - fscache_enable_cookie(cookie, &auxdata, nfsi->vfs_inode.i_size, + fscache_enable_cookie(cookie, &auxdata, i_size_read(inode), nfs_fscache_can_enable, inode); if (fscache_cookie_enabled(cookie)) set_bit(NFS_INO_FSCACHE, &NFS_I(inode)->flags); From patchwork Sun Oct 3 19:22:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545321 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: by 2002:ac2:43cd:0:0:0:0:0 with SMTP id u13csp3163904lfl; Sun, 3 Oct 2021 12:22:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNzXIzct2iahF89NxQvUKOo/bJzzY0iVD/M+N7eHvUAyK5xltGkKYEdHT2NeQlNFzUSRum X-Received: by 2002:a05:6402:2689:: with SMTP id w9mr13015703edd.188.1633288969613; Sun, 03 Oct 2021 12:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288969; cv=none; d=google.com; s=arc-20160816; b=q7e6bGx9p7E23IeciPr03Hw///KRy9Ti+QZmaB5e1LfrmZioo1bOzNQz8lkMNAJWHR DlbpMEpozcdcJeC4/O50X75uNoN81wrhoNTIq4nDRRemUallZHVJ6UbMWhdsPygNU49Q HCJsjAB7/0oeRVw1orVuB4uX0T3dZi/SUSixvxZ6R4PF/mq75ud2SI5mhYmQTf68oXpI 22vN4LUAtvsuc8uP2mBekuP3ucKkxJ05JOo1r8sYk4YRGc8pToEm1vjPfq0da6k9/+y6 iHRkkErybOa2g/aIekoiXX3E7WsQGIOwcKS8XLz9fqjcdqj3vON0rg4pu7mnVIaOaaQ1 biiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=ORB+H2bU1QTNjo7EsF4jvSBFjqD5wbS+47EdJ3RUBzg=; b=zbp6aKHeTh/kpbUZexAdpxTKgNGoxBXCdIwkxK8dKvWr7Ow6/iclYhePNSyylo8XEy JgnxD3XWoiwdJjU902MBik8zcQ01lQk13CDlyJhRASslLNjDA7NjNw3GIC6Ofml4hUDZ fCslLgBXR8CS5ueCC+V77nwGIcbvIZHQ6gE0gO4dZrUGLnJhNO9t2+tAoDBJuXNnn/bq ybunlXbWMamGOYr/WQ/QyqK1krcBaYwy0zKegl4Ljimg2KcIoprNZj/b1Y/mJfl5YRZa 37Ci1i6OzqurSFWKmfthuSXTdnfPK4wUHS2OOytdhpcVbUKQFyk7WkcRlnyL78E6ftFC 2F7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [207.211.31.120]) by mx.google.com with ESMTPS id og14si15184498ejc.176.2021.10.03.12.22.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 207.211.31.120 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-ou0H2_s6OIerPBlWDDy4sw-1; Sun, 03 Oct 2021 15:22:47 -0400 X-MC-Unique: ou0H2_s6OIerPBlWDDy4sw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A07F19057A9 for ; Sun, 3 Oct 2021 19:22:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 86A4A5F4EC; Sun, 3 Oct 2021 19:22:46 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECA0A5F4E8; Sun, 3 Oct 2021 19:22:45 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 4/7] NFS: Convert NFS fscache enable/disable dfprintks to tracepoints Date: Sun, 3 Oct 2021 15:22:35 -0400 Message-Id: <1633288958-8481-5-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: Convert the enable / disable NFS fscache dfprintks to tracepoints. Utilize the existing NFS inode trace event class, which allows us to keep the same output format to other NFS inode tracepoints. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.c | 5 +++-- fs/nfs/nfstrace.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 8f17fda5b8c9..a2b517846787 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -19,6 +19,7 @@ #include "internal.h" #include "iostat.h" #include "fscache.h" +#include "nfstrace.h" #define NFSDBG_FACILITY NFSDBG_FSCACHE @@ -314,11 +315,11 @@ void nfs_fscache_open_file(struct inode *inode, struct file *filp) nfs_fscache_update_auxdata(&auxdata, inode); if (inode_is_open_for_write(inode)) { - dfprintk(FSCACHE, "NFS: nfsi 0x%p disabling cache\n", nfsi); + trace_nfs_disable_fscache_inode(inode); clear_bit(NFS_INO_FSCACHE, &nfsi->flags); fscache_disable_cookie(cookie, &auxdata, true); } else { - dfprintk(FSCACHE, "NFS: nfsi 0x%p enabling cache\n", nfsi); + trace_nfs_enable_fscache_inode(inode); fscache_enable_cookie(cookie, &auxdata, i_size_read(inode), nfs_fscache_can_enable, inode); if (fscache_cookie_enabled(cookie)) diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index 8a224871be74..b4177f57f69b 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -209,6 +209,8 @@ DEFINE_NFS_INODE_EVENT(nfs_fsync_enter); DEFINE_NFS_INODE_EVENT_DONE(nfs_fsync_exit); DEFINE_NFS_INODE_EVENT(nfs_access_enter); +DEFINE_NFS_INODE_EVENT(nfs_enable_fscache_inode); +DEFINE_NFS_INODE_EVENT(nfs_disable_fscache_inode); TRACE_EVENT(nfs_access_exit, TP_PROTO( From patchwork Sun Oct 3 19:22:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545323 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Google-Smtp-Source: ABdhPJzlrzGOKmdlq4Ch/EaXIjrzO3ey5v2E6di/uRjXlP7rMvXYZw8qiryCnovTD1GoPuP6TNai X-Received: by 2002:a50:bb67:: with SMTP id y94mr5507892ede.308.1633288970102; Sun, 03 Oct 2021 12:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288970; cv=none; d=google.com; s=arc-20160816; b=J1Sfimy1l1XbBplpNh2j55DVRv5hJwLBF1ZmUwyf5WV7c5lI3lat4ZPWfL+cl7PAYl hcomHhfVtK89vqQ545v9iaDvWuGGIYRm8YUsVMlTimuN52g4Mper+8K4moJG6qbRkPLn X7SNeuhY/LvmCsCZKyiWyKormJgJCIBjBBL/zhlB1BYsBdKVxWKbwS2kvhmwZqOy9WSh NwpzPRLMbviHUhFOnbwTe7kQCKC+qYPjDKJMgo5Dukh/NkU5lpRKO/Iqn2hwp5LIULm1 uxDecD7nDSCJ51h9PRM2KhQDFz0NT/jkLpGiMihzLw7/GnYQXNCF8byH3fAW6ug2qXh8 bNaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=jMg9PWvIQ2bIc6cR3eaTN3UnePphLQ+I+R3S612riW4=; b=b1Vw49Zx470Fybgo9bA7ui58InhRR8TvVljgRMpGCdmF90ZeR+ZgEXt+VpP6MYK8+2 XNQessNYC5PGKx9Z3ULNcClFeOJ10UssOJ5SRt2nXHOAnzI1vttVrSxfNYFgNOYFdlJT 7Oi0cFnhCIFuHLzECZX8zpB57iRFcMMu/J8wIay/QKbHj6tOEgA0+39k00UBu46O3J6w 2pbeR7UKX58l44pl7JP8fvOP+pLcCA5+LRK88tnyRbfE2oM5KQD0mF+kzfECcz6cN7yL EWkdu2j5o80E2KQ7T9Hj+kYeXZBlncL4Uo+X0ETPnEn0WPpO9QNi1ewh7LZgnTMTB9dx XlnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com. [205.139.110.61]) by mx.google.com with ESMTPS id d17si1932025ejt.635.2021.10.03.12.22.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.61 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-Qdcch_QPMQephA8kDkUqKw-1; Sun, 03 Oct 2021 15:22:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 492051084684 for ; Sun, 3 Oct 2021 19:22:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 457355F4EC; Sun, 3 Oct 2021 19:22:47 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABC775F4E9; Sun, 3 Oct 2021 19:22:46 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 5/7] NFS: Replace dfprintks in favor of tracepoints in fscache IO paths Date: Sun, 3 Oct 2021 15:22:36 -0400 Message-Id: <1633288958-8481-6-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: Most of fscache and other NFS IO paths are now using tracepoints, so remove the dfprintks in these code paths and replace with a couple tracepoints to track page IO. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.c | 22 +++---------- fs/nfs/nfstrace.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 18 deletions(-) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index a2b517846787..1db1e298b915 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -335,22 +335,17 @@ int __nfs_readpage_from_fscache(struct inode *inode, struct page *page) { int ret; - dfprintk(FSCACHE, - "NFS: readpage_from_fscache(fsc:%p/p:%p(i:%lx f:%lx)/0x%p)\n", - nfs_i_fscache(inode), page, page->index, page->flags, inode); - if (PageChecked(page)) { - dfprintk(FSCACHE, "NFS: readpage_from_fscache: PageChecked\n"); ClearPageChecked(page); return 1; } + trace_nfs_fscache_page_event_read(inode, page); ret = fscache_fallback_read_page(nfs_i_fscache(inode), page); + trace_nfs_fscache_page_event_read_done(inode, page, ret); switch (ret) { case 0: /* Read completed synchronously */ - dfprintk(FSCACHE, - "NFS: readpage_from_fscache: read successful\n"); nfs_inc_fscache_stats(inode, NFSIOS_FSCACHE_PAGES_READ_OK); SetPageUptodate(page); return 0; @@ -358,13 +353,10 @@ int __nfs_readpage_from_fscache(struct inode *inode, struct page *page) case -ENOBUFS: /* inode not in cache */ case -ENODATA: /* page not in cache */ nfs_inc_fscache_stats(inode, NFSIOS_FSCACHE_PAGES_READ_FAIL); - dfprintk(FSCACHE, - "NFS: readpage_from_fscache failed %d\n", ret); SetPageChecked(page); return 1; default: - dfprintk(FSCACHE, "NFS: readpage_from_fscache %d\n", ret); nfs_inc_fscache_stats(inode, NFSIOS_FSCACHE_PAGES_READ_FAIL); SetPageChecked(page); } @@ -378,15 +370,9 @@ void __nfs_readpage_to_fscache(struct inode *inode, struct page *page) { int ret; - dfprintk(FSCACHE, - "NFS: readpage_to_fscache(fsc:%p/p:%p(i:%lx f:%lx))\n", - nfs_i_fscache(inode), page, page->index, page->flags); - + trace_nfs_fscache_page_event_write(inode, page); ret = fscache_fallback_write_page(nfs_i_fscache(inode), page); - - dfprintk(FSCACHE, - "NFS: readpage_to_fscache: p:%p(i:%lu f:%lx) ret %d\n", - page, page->index, page->flags, ret); + trace_nfs_fscache_page_event_write_done(inode, page, ret); if (ret != 0) { nfs_inc_fscache_stats(inode, NFSIOS_FSCACHE_PAGES_WRITTEN_FAIL); diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index b4177f57f69b..662dddc2eb96 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -880,6 +880,103 @@ ) ); +DECLARE_EVENT_CLASS(nfs_fscache_page_event, + TP_PROTO( + const struct inode *inode, + const struct page *page + ), + + TP_ARGS(inode, page), + + TP_STRUCT__entry( + __field(dev_t, dev) + __field(u32, fhandle) + __field(u64, fileid) + __field(loff_t, offset) + __field(u32, count) + ), + + TP_fast_assign( + const struct nfs_inode *nfsi = NFS_I(inode); + const struct nfs_fh *fh = &nfsi->fh; + + __entry->offset = page->index << PAGE_SHIFT; + __entry->count = 4096; + __entry->dev = inode->i_sb->s_dev; + __entry->fileid = nfsi->fileid; + __entry->fhandle = nfs_fhandle_hash(fh); + ), + + TP_printk( + "fileid=%02x:%02x:%llu fhandle=0x%08x " + "offset=%lld count=%u", + MAJOR(__entry->dev), MINOR(__entry->dev), + (unsigned long long)__entry->fileid, + __entry->fhandle, + (long long)__entry->offset, __entry->count + ) +); + +DECLARE_EVENT_CLASS(nfs_fscache_page_event_done, + TP_PROTO( + const struct inode *inode, + const struct page *page, + int error + ), + + TP_ARGS(inode, page, error), + + TP_STRUCT__entry( + __field(int, error) + __field(dev_t, dev) + __field(u32, fhandle) + __field(u64, fileid) + __field(loff_t, offset) + __field(u32, count) + ), + + TP_fast_assign( + const struct nfs_inode *nfsi = NFS_I(inode); + const struct nfs_fh *fh = &nfsi->fh; + + __entry->offset = page->index << PAGE_SHIFT; + __entry->count = 4096; + __entry->dev = inode->i_sb->s_dev; + __entry->fileid = nfsi->fileid; + __entry->fhandle = nfs_fhandle_hash(fh); + __entry->error = error; + ), + + TP_printk( + "fileid=%02x:%02x:%llu fhandle=0x%08x " + "offset=%lld count=%u error=%d", + MAJOR(__entry->dev), MINOR(__entry->dev), + (unsigned long long)__entry->fileid, + __entry->fhandle, + (long long)__entry->offset, __entry->count, + __entry->error + ) +); +#define DEFINE_NFS_FSCACHE_PAGE_EVENT(name) \ + DEFINE_EVENT(nfs_fscache_page_event, name, \ + TP_PROTO( \ + const struct inode *inode, \ + const struct page *page \ + ), \ + TP_ARGS(inode, page)) +#define DEFINE_NFS_FSCACHE_PAGE_EVENT_DONE(name) \ + DEFINE_EVENT(nfs_fscache_page_event_done, name, \ + TP_PROTO( \ + const struct inode *inode, \ + const struct page *page, \ + int error \ + ), \ + TP_ARGS(inode, page, error)) +DEFINE_NFS_FSCACHE_PAGE_EVENT(nfs_fscache_page_event_read); +DEFINE_NFS_FSCACHE_PAGE_EVENT_DONE(nfs_fscache_page_event_read_done); +DEFINE_NFS_FSCACHE_PAGE_EVENT(nfs_fscache_page_event_write); +DEFINE_NFS_FSCACHE_PAGE_EVENT_DONE(nfs_fscache_page_event_write_done); + TRACE_EVENT(nfs_initiate_read, TP_PROTO( const struct nfs_pgio_header *hdr From patchwork Sun Oct 3 19:22:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545325 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Google-Smtp-Source: ABdhPJxwgP3qzwLRJ7qCW1WC2iB9ZCjvUwgNLpzLUVp50SyY6AwaBwiJlu1iRQhOAay98sMEoy5r X-Received: by 2002:a17:906:15cf:: with SMTP id l15mr12411280ejd.568.1633288970677; Sun, 03 Oct 2021 12:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288970; cv=none; d=google.com; s=arc-20160816; b=cpiBiQOiMpuqLUVvWwSXY6SW7paSfjGgKuLpUPwZQ7p6alFwRYcP9UUun8am5Eyh3e gmNhCJJ7NDGRW2k+DJ95zl8gFUAx9di6sTzw6obnOndijqLHerPWDbrMrtblYirB/0Wx BCH7w8RjGj4xcow7s77t9ikBMGSpDoOW6s3XZecZb3T+0GS/uKNHefrbc2WB4Ki7flUV 5wxJUBE98/rCgvLuKRCKE791tUWA6Q8zZK72FQpvUAOfmL+XrJQKtalolB9nJn52IQwr PW/B8Nmmkd5uk07OCPeiDDN8UJ0kJGRvIKWFZLkBhaGJOjj1aV1NwQcYSfmY2Amq8I9P C4EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=PHVcg8GMk9x4oxIrNE/0LfJJOUWVeUcw1BVqh9eyRow=; b=efoGdwTJZwBywPj74D3LE73DzQ4R/P37RiHT5BYLB2/w7RBlg+lHGBh8n3yiV23sXi nWpO/YlvWg5IlccQYK/RfYFfBU+wPkdYYpebNGTSlZwK/FZ/nb2mDUveEjSwblplgy6I D7gvIlK7VNYrOYcP8/0YTOjOIJsgmC5CX86wRifQrM4Kw00xgNkGUT2mm8iR19SvP74b dvkfKDcJjXi2sBbL3Ks5FzGQM9yWpa5dBGuIeDjmnQ90ObPTlPTnFDssYWnGUw04RscE QjVNKb4pcgmCoxe6U1poKcxUjZi/UuLHQsFnIq7Q58GdcyVwSdrCo2iZMficR0yslDUT KbzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [205.139.110.120]) by mx.google.com with ESMTPS id 13si16146770ejf.489.2021.10.03.12.22.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 205.139.110.120 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-174-trvlQj1INPy0xw_GNCijTw-1; Sun, 03 Oct 2021 15:22:48 -0400 X-MC-Unique: trvlQj1INPy0xw_GNCijTw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07EEC5721D for ; Sun, 3 Oct 2021 19:22:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 044295F4EC; Sun, 3 Oct 2021 19:22:48 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B0895F4E8; Sun, 3 Oct 2021 19:22:47 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 6/7] NFS: Remove remaining dfprintks related to fscache cookies Date: Sun, 3 Oct 2021 15:22:37 -0400 Message-Id: <1633288958-8481-7-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: The fscache cookie APIs including fscache_acquire_cookie() and fscache_relinquish_cookie() now have very good tracing. Thus, there is no real need for dfprintks in the NFS fscache interface. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 1db1e298b915..d199ee103dc6 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -21,7 +21,7 @@ #include "fscache.h" #include "nfstrace.h" -#define NFSDBG_FACILITY NFSDBG_FSCACHE +#define NFSDBG_FACILITY NFSDBG_FSCACHE static struct rb_root nfs_fscache_keys = RB_ROOT; static DEFINE_SPINLOCK(nfs_fscache_keys_lock); @@ -86,8 +86,6 @@ void nfs_fscache_get_client_cookie(struct nfs_client *clp) &key, len, NULL, 0, clp, 0, true); - dfprintk(FSCACHE, "NFS: get client cookie (0x%p/0x%p)\n", - clp, clp->fscache); } /* @@ -95,9 +93,6 @@ void nfs_fscache_get_client_cookie(struct nfs_client *clp) */ void nfs_fscache_release_client_cookie(struct nfs_client *clp) { - dfprintk(FSCACHE, "NFS: releasing client cookie (0x%p/0x%p)\n", - clp, clp->fscache); - fscache_relinquish_cookie(clp->fscache, NULL, false); clp->fscache = NULL; } @@ -191,8 +186,6 @@ void nfs_fscache_get_super_cookie(struct super_block *sb, const char *uniq, int sizeof(key->key) + ulen, NULL, 0, nfss, 0, true); - dfprintk(FSCACHE, "NFS: get superblock cookie (0x%p/0x%p)\n", - nfss, nfss->fscache); return; non_unique: @@ -211,9 +204,6 @@ void nfs_fscache_release_super_cookie(struct super_block *sb) { struct nfs_server *nfss = NFS_SB(sb); - dfprintk(FSCACHE, "NFS: releasing superblock cookie (0x%p/0x%p)\n", - nfss, nfss->fscache); - fscache_relinquish_cookie(nfss->fscache, NULL, false); nfss->fscache = NULL; @@ -270,8 +260,6 @@ void nfs_fscache_clear_inode(struct inode *inode) struct nfs_inode *nfsi = NFS_I(inode); struct fscache_cookie *cookie = nfs_i_fscache(inode); - dfprintk(FSCACHE, "NFS: clear cookie (0x%p/0x%p)\n", nfsi, cookie); - nfs_fscache_update_auxdata(&auxdata, inode); fscache_relinquish_cookie(cookie, &auxdata, false); nfsi->fscache = NULL; From patchwork Sun Oct 3 19:22:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wysochanski X-Patchwork-Id: 12545327 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Google-Smtp-Source: ABdhPJzTUmXDPzytkFQ9OlWQaXzFdLQM+fC8la66aV4JLYGQhi2I3R0jI1WmB71un4oa4mtN4nxJ X-Received: by 2002:a50:8d85:: with SMTP id r5mr13079010edh.312.1633288971848; Sun, 03 Oct 2021 12:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633288971; cv=none; d=google.com; s=arc-20160816; b=GnTsT5Y0R7JDa/sV/zsKbk5MC3pqeuUlAfMETvhEAMURWWEYISpkwnokheeUExAkT8 IuzvlA+r158dm9Qwewg22UOlHoLY0RQAUFwRFN/NjYrGsArHGHmJzvVv2xEIQLPefyCC aTwQ5ZV5Vxy6xz6cEhWzZG2eY2Ky+AhylHXuk4kjmwxiqHtrCQladSQB0rLVY/YSPGVn ZqB/7DiCwvsKeSz8srRZxHF2nZYNSBeci6T7+fdmTOVoOVBI3/Eb83EPXeMLlLb/l/Lt EZ9MqW24bJWAZUIg04SoLPfUEBcJxsfD7M1R0roGwyLw7Tzmqvzon0UrE1JGVPqBmZQ9 rNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to; bh=kqjMmaSSnAvy0QV6APgLBGfLig6kIaR6fSkxdiONH5s=; b=pd0DXuVBxqVDWAKkMq6UAObT3s2TzXvKjpAWW6M/1t315qrcy/qxQlyeqMZ8AB+kZL l+nmhqsfmWqYbrHrgjWR5Rzh4oOA6wPkq620zo9E57dOwGzAOMbRF/1zMd0Mlt2v2c2w G0thfJB6XUO1RfFMWCgOWErZtLQESpmqwAn8rMHfYM5uReoP75HeieyuzFxyZQkWz8Kg gehQNwjXP7798zMNCHpwtG8FwN0U5wH5Ywx605CobCWCJKaPQ6V7YtvpxTIbb04VJc6s 4LFlM8o3/RY67+raQuElXvy7MLuG736UGoY5dUJmdXc/jthmNS8Wh9DaAVgdP/jUihlx 6Xgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) smtp.mailfrom=dwysocha@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com. [207.211.31.81]) by mx.google.com with ESMTPS id t17si21286044edd.346.2021.10.03.12.22.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Oct 2021 12:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) Authentication-Results: mx.google.com; spf=pass (google.com: domain gapps.redhat.com configured 207.211.31.81 as internal address) smtp.mailfrom=dwysocha@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-pJuAUi8HMKuhwKxb9HE_iA-1; Sun, 03 Oct 2021 15:22:49 -0400 X-MC-Unique: pJuAUi8HMKuhwKxb9HE_iA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCA30802C87 for ; Sun, 3 Oct 2021 19:22:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B8AED5F4EC; Sun, 3 Oct 2021 19:22:48 +0000 (UTC) Received: from dwysocha.rdu.csb (unknown [10.22.8.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A2E25F4E8; Sun, 3 Oct 2021 19:22:48 +0000 (UTC) From: Dave Wysochanski To: Trond Myklebust , Anna Schumaker , David Howells Cc: linux-cachefs@redhat.com, linux-nfs@vger.kernel.org Subject: [PATCH v1 7/7] NFS: Remove remaining usages of NFSDBG_FSCACHE Date: Sun, 3 Oct 2021 15:22:38 -0400 Message-Id: <1633288958-8481-8-git-send-email-dwysocha@redhat.com> In-Reply-To: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> References: <1633288958-8481-1-git-send-email-dwysocha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com List-Id: The NFS fscache interface has removed all dfprintks so remove the NFSDBG_FSCACHE defines. Signed-off-by: Dave Wysochanski --- fs/nfs/fscache-index.c | 2 -- fs/nfs/fscache.c | 2 -- include/uapi/linux/nfs_fs.h | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/nfs/fscache-index.c b/fs/nfs/fscache-index.c index 4bd5ce736193..71bb4270641f 100644 --- a/fs/nfs/fscache-index.c +++ b/fs/nfs/fscache-index.c @@ -17,8 +17,6 @@ #include "internal.h" #include "fscache.h" -#define NFSDBG_FACILITY NFSDBG_FSCACHE - /* * Define the NFS filesystem for FS-Cache. Upon registration FS-Cache sticks * the cookie for the top-level index object for NFS into here. The top-level diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index d199ee103dc6..016e6cb13d28 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -21,8 +21,6 @@ #include "fscache.h" #include "nfstrace.h" -#define NFSDBG_FACILITY NFSDBG_FSCACHE - static struct rb_root nfs_fscache_keys = RB_ROOT; static DEFINE_SPINLOCK(nfs_fscache_keys_lock); diff --git a/include/uapi/linux/nfs_fs.h b/include/uapi/linux/nfs_fs.h index 3afe3767c55d..caa8d2234958 100644 --- a/include/uapi/linux/nfs_fs.h +++ b/include/uapi/linux/nfs_fs.h @@ -52,7 +52,7 @@ #define NFSDBG_CALLBACK 0x0100 #define NFSDBG_CLIENT 0x0200 #define NFSDBG_MOUNT 0x0400 -#define NFSDBG_FSCACHE 0x0800 +#define NFSDBG_UNUSED 0x0800 /* unused; was FSCACHE */ #define NFSDBG_PNFS 0x1000 #define NFSDBG_PNFS_LD 0x2000 #define NFSDBG_STATE 0x4000