From patchwork Thu May 31 18:07:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10441771 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 D23E2603D7 for ; Thu, 31 May 2018 18:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCD9128E05 for ; Thu, 31 May 2018 18:08:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1E1928D8D; Thu, 31 May 2018 18:08:42 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable 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 67D8628DB5 for ; Thu, 31 May 2018 18:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755918AbeEaSIk (ORCPT ); Thu, 31 May 2018 14:08:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51156 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755894AbeEaSIi (ORCPT ); Thu, 31 May 2018 14:08:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8gew+wO/l5V7tWJQ1YHk1uW3lgKoLCtNyPjJwGGxEXc=; b=Upte6K6G5s0C4SHCW3FaGtllB iT3w2NWAytjnjU6M1jiPuLDGm0ELcmTxBiCAJAkHlTIsL5drjCUF2VAkA2aAe4fScCeZcAfUP/5CQ p5dolDoyW7AHKs0zHrgIoIxikEexmK4nSltFI47m6iEjKkqQjquYMlPJwVLyGQyb7FqD7t+xT0Nzk Ub5J98dDoSG7Iw+rL6HhQ1UuttQpxr6KLI6QXcmZ5ImxeDxSHnEmGSqw4gAK/CMFLZojtZ9OO5iJX x8uXEtGMF1JJie+JOVjj6fx9U5SCx/8qGVS0G0/YJ2d25AbgDhntsi1HPyKUdP7bvqkLF9rUKRI06 nM10ux4LQ==; Received: from 213-225-38-123.nat.highway.a1.net ([213.225.38.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOS05-0003tv-Iy; Thu, 31 May 2018 18:08:38 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Subject: [PATCH 11/21] xfs: rename the offset variable in xfs_writepage_map Date: Thu, 31 May 2018 20:07:49 +0200 Message-Id: <20180531180759.21631-12-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531180759.21631-1-hch@lst.de> References: <20180531180759.21631-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Calling it file_offset makes the usage more clear, especially with a new poffset variable that will be added soon for the offset inside the page. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster --- fs/xfs/xfs_aops.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index d536509ca05b..6f57a785f4d3 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -824,15 +824,15 @@ xfs_writepage_map( struct xfs_ioend *ioend, *next; struct buffer_head *bh, *head; ssize_t len = i_blocksize(inode); - uint64_t offset; + uint64_t file_offset; /* file offset of page */ int error = 0; int count = 0; unsigned int new_type; bh = head = page_buffers(page); - offset = page_offset(page); + file_offset = page_offset(page); do { - if (offset >= end_offset) + if (file_offset >= end_offset) break; /* @@ -864,7 +864,7 @@ xfs_writepage_map( * If we already have a valid COW mapping keep using it. */ if (wpc->io_type == XFS_IO_COW && - xfs_imap_valid(inode, &wpc->imap, offset)) { + xfs_imap_valid(inode, &wpc->imap, file_offset)) { wpc->imap_valid = true; new_type = XFS_IO_COW; } @@ -876,13 +876,13 @@ xfs_writepage_map( if (wpc->imap_valid) wpc->imap_valid = xfs_imap_valid(inode, &wpc->imap, - offset); + file_offset); if (!wpc->imap_valid || xfs_is_reflink_inode(XFS_I(inode))) { - error = xfs_map_blocks(wpc, inode, offset); + error = xfs_map_blocks(wpc, inode, file_offset); if (error) goto out; wpc->imap_valid = xfs_imap_valid(inode, &wpc->imap, - offset); + file_offset); } if (!wpc->imap_valid || wpc->io_type == XFS_IO_HOLE) @@ -890,10 +890,10 @@ xfs_writepage_map( lock_buffer(bh); if (wpc->io_type != XFS_IO_OVERWRITE) - xfs_map_at_offset(inode, bh, &wpc->imap, offset); - xfs_add_to_ioend(inode, bh, offset, wpc, wbc, &submit_list); + xfs_map_at_offset(inode, bh, &wpc->imap, file_offset); + xfs_add_to_ioend(inode, bh, file_offset, wpc, wbc, &submit_list); count++; - } while (offset += len, ((bh = bh->b_this_page) != head)); + } while (file_offset += len, ((bh = bh->b_this_page) != head)); ASSERT(wpc->ioend || list_empty(&submit_list));