From nobody Mon Jan 15 23:17:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TDShm5WNLz57nSC; Mon, 15 Jan 2024 23:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TDShm4mYkz4FYH; Mon, 15 Jan 2024 23:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705360632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7HOIOZXL90m6JSzIhv0VfLjH/oXqAG3uLexT18I8Zg=; b=bzPR3uSwy1Jv69TG8+2Xc1XqS1dXKZPgCn0p0CNHi+HAcDdkIVjRFdWHEQILQGoC+jz3T/ ZMrprhN9Lj5waetRmew1nJ48Dv6Yl4mXTKGQaKt49Pyd/Ypwy8vt6y4zWPCBUkPjkQdnu4 J3klImuzaPL3222iLr3950CkUB8akeyu/suvzTz+Od0mYZul95ObGS8mNTXLn3ue/DyAx9 R6P2y139nRq238VhoQ8WrOO2PCjBeN1b0BUi9M+EIefP4mA8SjliFkanAAKtX2QUll29Iq 7uLqf+0V2F3EWpg/jhpJCyUB2g2E4LtLWMtJ5/OPMpKq8kuU/5ndeeiTk8D9YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705360632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7HOIOZXL90m6JSzIhv0VfLjH/oXqAG3uLexT18I8Zg=; b=k57jRard3dzTOlW/V05rswakYApTNwdJ7y+A07wjTrPSix5Rd2YikTTiCusS/oZFBaA/UC tLYxSnZlBxnKbdNfNiGUS4AiQbl+Z0OS3bkQtfxxqtDdaCvR0yTKWpGQ1Z0WfQ5L6MECdO ytrbE9tZgTCO4s3H7vq3Mj9uZv8R3n79uH6Pod2HdAKLh0umGHeCWx8XMWDWfR/juzbViu hQ+2X5l54C8cu0Sxok4eg5c58bENlevvRdZ2Fsqb/uFTk/tRre02zH83mzAhqW4IgaRONC J1gKgJcVys8+naylM5853avqNVDgNVC/Ehql7X9iYbm8rWD8m2YrhDlYxeDlcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705360632; a=rsa-sha256; cv=none; b=jYV+lb3BdEt58n3f+9MbwYvgnv1mtKTbH4S9BCyKPQwlf9MpLqZFCZoDuP0hEP9y3Igt6r lV8L1gAQzukRq0S21DnPPjkPvPwjVLtcLahcr3wEvbUpbhvkoa0pQ51mLo/tRsbhavSCos KDsw3cByNinKU5BhSpm6yVSUoyw18fVmagDvr8Fs2x4uwmsE9DS8Or13oFmId96hHoWDGT 3JPFHiCZl9Zs8inzbkx1/xA/BNPl700reddGKS2O5vxQUOAegmCkAx/vYpenEiBu+68RCU r/lyiD30aAQl6+z5FiBmKZKMy2lTf+dSOF6ygxl/ki17ab8k6Dp2V04i+2oQLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TDShm3qJPzGdR; Mon, 15 Jan 2024 23:17:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40FNHC3G002783; Mon, 15 Jan 2024 23:17:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40FNHCne002780; Mon, 15 Jan 2024 23:17:12 GMT (envelope-from git) Date: Mon, 15 Jan 2024 23:17:12 GMT Message-Id: <202401152317.40FNHCne002780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: daf26f9350cf - main - fusefs: more consistent operand ordering in io.cc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daf26f9350cf8fb3ae60d4528b60ddf65a56f5cc Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=daf26f9350cf8fb3ae60d4528b60ddf65a56f5cc commit daf26f9350cf8fb3ae60d4528b60ddf65a56f5cc Author: Alan Somers AuthorDate: 2024-01-15 23:16:40 +0000 Commit: Alan Somers CommitDate: 2024-01-15 23:16:40 +0000 fusefs: more consistent operand ordering in io.cc MFC after: 2 weeks --- tests/sys/fs/fusefs/io.cc | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc index 357772c31c2c..283b601c9e87 100644 --- a/tests/sys/fs/fusefs/io.cc +++ b/tests/sys/fs/fusefs/io.cc @@ -281,7 +281,7 @@ void do_ftruncate(off_t offs) m_filesize = offs; } -void do_mapread(ssize_t size, off_t offs) +void do_mapread(off_t offs, ssize_t size) { void *control_buf, *p; off_t pg_offset, page_mask; @@ -307,7 +307,7 @@ void do_mapread(ssize_t size, off_t offs) free(control_buf); } -void do_read(ssize_t size, off_t offs) +void do_read(off_t offs, ssize_t size) { void *test_buf, *control_buf; ssize_t r; @@ -331,7 +331,7 @@ void do_read(ssize_t size, off_t offs) free(test_buf); } -void do_mapwrite(ssize_t size, off_t offs) +void do_mapwrite(off_t offs, ssize_t size) { char *buf; void *p; @@ -368,7 +368,7 @@ void do_mapwrite(ssize_t size, off_t offs) ASSERT_EQ(0, munmap(p, map_size)) << strerror(errno); } -void do_write(ssize_t size, off_t offs) +void do_write(off_t offs, ssize_t size) { char *buf; long i; @@ -416,9 +416,9 @@ TEST_P(Io, extend_from_dirty_page) ssize_t rsize = 0x9b22; off_t truncsize = 0x28702; - do_write(wsize, wofs); + do_write(wofs, wsize); do_ftruncate(truncsize); - do_read(rsize, rofs); + do_read(rofs, rsize); } /* @@ -428,9 +428,9 @@ TEST_P(Io, extend_from_dirty_page) */ TEST_P(IoCacheable, extend_by_mapwrite) { - do_mapwrite(0x849e, 0x29a3a); /* [0x29a3a, 0x31ed7] */ - do_mapwrite(0x3994, 0x3c7d8); /* [0x3c7d8, 0x4016b] */ - do_read(0xf556, 0x30c16); /* [0x30c16, 0x4016b] */ + do_mapwrite(0x29a3a, 0x849e); /* [0x29a3a, 0x31ed7] */ + do_mapwrite(0x3c7d8, 0x3994); /* [0x3c7d8, 0x4016b] */ + do_read(0x30c16, 0xf556); /* [0x30c16, 0x4016b] */ } /* @@ -442,9 +442,9 @@ TEST_P(IoCacheable, extend_by_mapwrite) */ TEST_P(Io, last_page) { - do_write(0xcc77, 0x1134f); /* [0x1134f, 0x1dfc5] */ - do_write(0xdfa7, 0x2096a); /* [0x2096a, 0x2e910] */ - do_read(0xb5b7, 0x1a3aa); /* [0x1a3aa, 0x25960] */ + do_write(0x1134f, 0xcc77); /* [0x1134f, 0x1dfc5] */ + do_write(0x2096a, 0xdfa7); /* [0x2096a, 0x2e910] */ + do_read(0x1a3aa, 0xb5b7); /* [0x1a3aa, 0x25960] */ } /* @@ -454,8 +454,8 @@ TEST_P(Io, last_page) */ TEST_P(IoCacheable, mapread_hole) { - do_write(0x123b7, 0xf205); /* [0xf205, 0x215bb] */ - do_mapread(0xeeea, 0x2f4c); /* [0x2f4c, 0x11e35] */ + do_write(0xf205, 0x123b7); /* [0xf205, 0x215bb] */ + do_mapread(0x2f4c, 0xeeea); /* [0x2f4c, 0x11e35] */ } /* @@ -470,8 +470,8 @@ TEST_P(Io, read_hole_from_cached_block) off_t rofs = 0x472e; ssize_t rsize = 0xd8d5; - do_write(wsize, wofs); - do_read(rsize, rofs); + do_write(wofs, wsize); + do_read(rofs, rsize); } /* @@ -491,10 +491,10 @@ TEST_P(Io, truncate_into_dirty_buffer) ssize_t rsize = 0x29ff; off_t truncsize1 = 0x152b4; - do_write(wsize0, wofs0); - do_write(wsize1, wofs1); + do_write(wofs0, wsize0); + do_write(wofs1, wsize1); do_ftruncate(truncsize0); - do_read(rsize, rofs); + do_read(rofs, rsize); do_ftruncate(truncsize1); close(m_test_fd); } @@ -523,11 +523,11 @@ TEST_P(Io, truncate_into_dirty_buffer2) * Creates a dirty buffer. The part in lbn 2 doesn't flush * synchronously. */ - do_write(wsize, wofs); + do_write(wofs, wsize); /* Truncates part of the dirty buffer created in step 2 */ do_ftruncate(truncsize1); /* XXX ?I don't know why this is necessary? */ - do_read(rsize2, rofs2); + do_read(rofs2, rsize2); /* Truncates the dirty buffer */ do_ftruncate(truncsize2); close(m_test_fd); @@ -558,10 +558,10 @@ TEST_P(Io, truncate_into_dirty_buffer2) */ TEST_P(Io, resize_a_valid_buffer_while_extending) { - do_write(0x14530, 0x36ee6); /* [0x36ee6, 0x4b415] */ - do_write(0x1507c, 0x33256); /* [0x33256, 0x482d1] */ - do_write(0x175c, 0x4c03d); /* [0x4c03d, 0x4d798] */ - do_read(0xe277, 0x3599c); /* [0x3599c, 0x43c12] */ + do_write(0x36ee6, 0x14530); /* [0x36ee6, 0x4b415] */ + do_write(0x33256, 0x1507c); /* [0x33256, 0x482d1] */ + do_write(0x4c03d, 0x175c); /* [0x4c03d, 0x4d798] */ + do_read(0x3599c, 0xe277); /* [0x3599c, 0x43c12] */ close(m_test_fd); } @@ -572,7 +572,7 @@ TEST_P(Io, resize_a_valid_buffer_while_extending) */ TEST_P(IoCacheable, vnode_pager_generic_putpage_clean_block_at_eof) { - do_mapwrite(0x1bbc3, 0x3b4e0); + do_mapwrite(0x3b4e0, 0x1bbc3); } /* @@ -581,7 +581,7 @@ TEST_P(IoCacheable, vnode_pager_generic_putpage_clean_block_at_eof) */ TEST_P(IoCopyFileRange, copy_file_range_from_mapped_write) { - do_mapwrite(0x1000, 0); + do_mapwrite(0, 0x1000); do_copy_file_range(0, 0x1000, 0x1000); do_read(0x1000, 0x1000); }