Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2024 01:02:40 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c4c138072ae6 - stable/14 - vnode_pager_generic_putpages(): rename maxblksz local to max_offset
Message-ID:  <202401180102.40I12ecg036701@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c4c138072ae6623661af9392f86e5c347bfb97dd

commit c4c138072ae6623661af9392f86e5c347bfb97dd
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-09 11:32:39 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-18 00:51:33 +0000

    vnode_pager_generic_putpages(): rename maxblksz local to max_offset
    
    (cherry picked from commit ed1a88a3116a59b4fd37912099a575b4c8f559dc)
---
 sys/vm/vnode_pager.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 013b371964db..5bfaea3d4ff1 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -1358,7 +1358,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
 {
 	vm_object_t object;
 	vm_page_t m;
-	vm_ooffset_t maxblksz, next_offset, poffset, prev_offset;
+	vm_ooffset_t max_offset, next_offset, poffset, prev_offset;
 	struct uio auio;
 	struct iovec aiov;
 	off_t prev_resid, wrsz;
@@ -1433,15 +1433,15 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
 	auio.uio_segflg = UIO_NOCOPY;
 	auio.uio_rw = UIO_WRITE;
 	auio.uio_td = NULL;
-	maxblksz = roundup2(poffset + maxsize, DEV_BSIZE);
+	max_offset = roundup2(poffset + maxsize, DEV_BSIZE);
 
-	for (prev_offset = poffset; prev_offset < maxblksz;) {
+	for (prev_offset = poffset; prev_offset < max_offset;) {
 		/* Skip clean blocks. */
-		for (in_hole = true; in_hole && prev_offset < maxblksz;) {
+		for (in_hole = true; in_hole && prev_offset < max_offset;) {
 			m = ma[OFF_TO_IDX(prev_offset - poffset)];
 			for (i = vn_off2bidx(prev_offset);
 			    i < sizeof(vm_page_bits_t) * NBBY &&
-			    prev_offset < maxblksz; i++) {
+			    prev_offset < max_offset; i++) {
 				if (vn_dirty_blk(m, prev_offset)) {
 					in_hole = false;
 					break;
@@ -1453,11 +1453,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *ma, int bytecount,
 			goto write_done;
 
 		/* Find longest run of dirty blocks. */
-		for (next_offset = prev_offset; next_offset < maxblksz;) {
+		for (next_offset = prev_offset; next_offset < max_offset;) {
 			m = ma[OFF_TO_IDX(next_offset - poffset)];
 			for (i = vn_off2bidx(next_offset);
 			    i < sizeof(vm_page_bits_t) * NBBY &&
-			    next_offset < maxblksz; i++) {
+			    next_offset < max_offset; i++) {
 				if (!vn_dirty_blk(m, next_offset))
 					goto start_write;
 				next_offset += DEV_BSIZE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401180102.40I12ecg036701>