From patchwork Wed Feb 14 06:29:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang He X-Patchwork-Id: 10218099 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 4C86C6055C for ; Wed, 14 Feb 2018 06:29:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 370D528999 for ; Wed, 14 Feb 2018 06:29:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 297A2289DE; Wed, 14 Feb 2018 06:29:56 +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=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BCDB28999 for ; Wed, 14 Feb 2018 06:29:55 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1E6R0Ys141041; Wed, 14 Feb 2018 06:29:40 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2g4frnr1pm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Feb 2018 06:29:40 +0000 Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1E6TbgM000485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Feb 2018 06:29:37 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1elqZV-00006f-J5; Tue, 13 Feb 2018 22:29:37 -0800 Received: from userv0022.oracle.com ([156.151.31.74]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1elqZ5-00004v-Pe for ocfs2-devel@oss.oracle.com; Tue, 13 Feb 2018 22:29:12 -0800 Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1E6TBn2016335 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Wed, 14 Feb 2018 06:29:11 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1E6RAG4039158 for ; Wed, 14 Feb 2018 06:29:11 GMT Received: from prv-mh.provo.novell.com (prv-mh.provo.novell.com [137.65.248.74]) by userp2030.oracle.com with ESMTP id 2g49usvf9k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 14 Feb 2018 06:29:10 +0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Tue, 13 Feb 2018 23:29:08 -0700 Message-Id: <5A83D732020000F9001C8D78@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.0.0 Date: Tue, 13 Feb 2018 23:29:06 -0700 From: "Gang He" To: , , , , , References: <02609aba-84b2-a22d-3f3b-bc1944b94260@huawei.com> In-Reply-To: <02609aba-84b2-a22d-3f3b-bc1944b94260@huawei.com> Mime-Version: 1.0 Content-Disposition: inline X-CLX-Shades: MLX X-CLX-Response: 1TFkXGxwfEQpMehcaEQpZTRdnZnIRCllJFxpxGhAadwYbHh9xGB0QGncGGBo GGhEKWV4XaG55EQpJRhdFWEtJRk91WlhFTl9JXkNFRBl1T0sRCkNOF1ASfFoaYWMTRHxPHHBGaX wYQ2xjYx1YYWhkW0QcYHtCEQpYXBcfBBoEGxgfB05JHR4TGh1MBRsaBBsaGgQeEgQbEBseGh8aE QpeWRd4X3JceREKTVwXGRsTEQpMWhd4aU1NexEKRVkXb2sRCkxfF3oFBQUFBQUFBQVvEQpMRhds a2sRCkNaFxsZHQQcHwQYHhIEHR4RCkJeFxsRCkReFxwRCkRJFxsRCkJGF2JQUHxJQH5fUk5iEQp CXBcaEQpCRRdtWlgdXENDTm9GYxEKQk4XZx5gGnNFTGFHAUQRCkJMF2tJY0JlYxNbQVNhEQpCbB dpW05efUlHW2xZYREKQkAXYB5bXl9PRRkFQmURCkJYF2J9b3kBTxgZcHB7EQpaWBcYEQpwZxdja 1pNbGxSYFB/SxAZGhEKcGgXa2Zucn55eXpwEx8QHhIRCnBoF21YS3AbZ2tuGklkEB4SEQpwaBdn TFJ6Hx1GXXlhQxAZGhEKcGgXbF1IQW8eYlwdQmkQHhIRCnBoF2NwRkxjTXBiBVMcEBkaEQpwZxd pcERPf1phZ39yXhAeEhEKcGcXbVpyAUNPXHJFT08QHhIRCnBnF2YeSW5JGR16U2NDEB4SEQpwZx dnfh0SH0xPSEt5chAeEhEKcH8XZmlETVp+EkhTZ0wQGxsTEQpwXxdsS2hAcm8YaHttYBAeEhEKc H0XZFgZeWJcX09uawUQHhIRCnBsF2d8R3JtfU54AR5TEBkaEQptfhcaEQpYTRdLESA= X-PDR: PASS X-Source-IP: 137.65.248.74 X-ServerName: prv-mh.provo.novell.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:novell.com ~all X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8804 signatures=668670 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=165 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802140076 X-Spam: Clean Cc: ocfs2-devel@oss.oracle.com Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: keep the trace point consistent with the function name X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8804 signatures=668670 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802140076 X-Virus-Scanned: ClamAV using ClamSMTP Looks good to me. Thanks Gang >>> Jia Guo 02/14/18 12:53 PM >>> keep the trace point consistent with the function name Fixes: 3ef045c3d8ae ("ocfs2: switch to ->write_iter()") Signed-off-by: Jia Guo Reviewed-by: Jun Piao Reviewed-by: Yiwen Jiang Reviewed-by: Alex Chen Reviewed-by: Gang He --- fs/ocfs2/aops.h | 2 +- fs/ocfs2/file.c | 8 ++++---- fs/ocfs2/ocfs2_trace.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/ocfs2/aops.h b/fs/ocfs2/aops.h index 8614ff0..3494a62 100644 --- a/fs/ocfs2/aops.h +++ b/fs/ocfs2/aops.h @@ -78,7 +78,7 @@ static inline void ocfs2_iocb_set_rw_locked(struct kiocb *iocb, int level) /* * Using a named enum representing lock types in terms of #N bit stored in * iocb->private, which is going to be used for communication between - * ocfs2_dio_end_io() and ocfs2_file_aio_write/read(). + * ocfs2_dio_end_io() and ocfs2_file_write/read_iter(). */ enum ocfs2_iocb_lock_bits { OCFS2_IOCB_RW_LOCK = 0, diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 5d1784a..85aef34 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2257,7 +2257,7 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb, int direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0; int nowait = iocb->ki_flags & IOCB_NOWAIT ? 1 : 0; - trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry, + trace_ocfs2_file_write_iter(inode, file, file->f_path.dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, file->f_path.dentry->d_name.len, file->f_path.dentry->d_name.name, @@ -2405,7 +2405,7 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb, int direct_io = iocb->ki_flags & IOCB_DIRECT ? 1 : 0; int nowait = iocb->ki_flags & IOCB_NOWAIT ? 1 : 0; - trace_ocfs2_file_aio_read(inode, filp, filp->f_path.dentry, + trace_ocfs2_file_read_iter(inode, filp, filp->f_path.dentry, (unsigned long long)OCFS2_I(inode)->ip_blkno, filp->f_path.dentry->d_name.len, filp->f_path.dentry->d_name.name, @@ -2448,7 +2448,7 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb, * * Take and drop the meta data lock to update inode fields * like i_size. This allows the checks down below - * generic_file_aio_read() a chance of actually working. + * generic_file_read_iter() a chance of actually working. */ ret = ocfs2_inode_lock_atime(inode, filp->f_path.mnt, &lock_level, !nowait); @@ -2460,7 +2460,7 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb, ocfs2_inode_unlock(inode, lock_level); ret = generic_file_read_iter(iocb, to); - trace_generic_file_aio_read_ret(ret); + trace_generic_file_read_iter_ret(ret); /* buffered aio wouldn't have proper lock coverage today */ BUG_ON(ret == -EIOCBQUEUED && !(iocb->ki_flags & IOCB_DIRECT)); diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h index e2a11aa..2ee76a9 100644 --- a/fs/ocfs2/ocfs2_trace.h +++ b/fs/ocfs2/ocfs2_trace.h @@ -1311,11 +1311,11 @@ DEFINE_OCFS2_FILE_OPS(ocfs2_file_release); DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file); -DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write); +DEFINE_OCFS2_FILE_OPS(ocfs2_file_write_iter); DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write); -DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read); +DEFINE_OCFS2_FILE_OPS(ocfs2_file_read_iter); DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file); @@ -1467,7 +1467,7 @@ TRACE_EVENT(ocfs2_prepare_inode_for_write, __entry->saved_pos, __entry->count, __entry->wait) ); -DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret); +DEFINE_OCFS2_INT_EVENT(generic_file_read_iter_ret); /* End of trace events for fs/ocfs2/file.c. */