PERFORCE change 207176 for review

John Baldwin jhb at FreeBSD.org
Thu Mar 1 19:31:32 UTC 2012


http://p4web.freebsd.org/@@207176?ac=10

Change 207176 by jhb at jhb_jhbbsd on 2012/03/01 19:31:06

	Compile.

Affected files ...

.. //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#5 edit

Differences ...

==== //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#5 (text+ko) ====

@@ -442,17 +442,21 @@
 			return (0);
 		}
 		fs = ip->i_fs;
-		if (blkoffset(fs, start) != 0) {
+		if (blkoff(fs, start) != 0) {
 			size = blksize(fs, ip, lblkno(fs, start));
-			start += size - blkoffset(fs, start);
-			KASSERT(blkoffset(fs, start) == 0,
+			start += size - blkoff(fs, start);
+			KASSERT(blkoff(fs, start) == 0,
 			    ("failed to adjust range start to block boundary"));
 		}
-		if (end < ip->i_size && blkoffset(fs, end) != 0) {
-			end -= blkoffset(fs, end);
-			KASSERT(blkoffset(fs, end) == 0,
+		if (end < ip->i_size && blkoff(fs, end) != 0) {
+			end -= blkoff(fs, end);
+			KASSERT(blkoff(fs, end) == 0,
 			    ("failed to adjust range end to block boundary"));
 		}
+		/* XXX: Debug */
+		if (ap->a_start != start || ap->a_end != end)
+			printf("ffs_advise(DONTNEED): (%#lx-%#lx) -> (%#lx-%#lx)",
+			    ap->a_start, ap->a_end, start, end);
 		VOP_UNLOCK(vp, 0);
 		if (start > end)
 			return (0);


More information about the p4-projects mailing list