Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/chfs blkoff -> chfs_blkoff



details:   https://anonhg.NetBSD.org/src/rev/6c006d322524
branches:  trunk
changeset: 787468:6c006d322524
user:      dholland <dholland%NetBSD.org@localhost>
date:      Wed Jun 19 18:15:35 2013 +0000

description:
blkoff -> chfs_blkoff
blksize -> chfs_blksize

diffstat:

 sys/ufs/chfs/chfs_vnops.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (84 lines):

diff -r a5c842ddd65b -r 6c006d322524 sys/ufs/chfs/chfs_vnops.c
--- a/sys/ufs/chfs/chfs_vnops.c Wed Jun 19 18:02:21 2013 +0000
+++ b/sys/ufs/chfs/chfs_vnops.c Wed Jun 19 18:15:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_vnops.c,v 1.15 2013/03/18 19:35:47 plunky Exp $   */
+/*     $NetBSD: chfs_vnops.c,v 1.16 2013/06/19 18:15:35 dholland Exp $ */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -583,7 +583,7 @@
        (((off_t)(blk)) << (chmp)->chm_fs_bshift)
 
 /* calculates (loc % chmp->chm_chm_fs_bsize) */
-#define        blkoff(chmp, loc)                                                             \
+#define        chfs_blkoff(chmp, loc)                                                        \
        ((loc) & (chmp)->chm_fs_qbmask)
 
 /* calculates (loc / chmp->chm_chm_fs_bsize) */
@@ -594,10 +594,10 @@
 #define        fragroundup(chmp, size)                                               \
        (((size) + (chmp)->chm_fs_qfmask) & (chmp)->chm_fs_fmask)
 
-#define        blksize(chmp, ip, lbn)                                                \
+#define        chfs_blksize(chmp, ip, lbn)                                           \
        (((lbn) >= UFS_NDADDR || (ip)->size >= lblktosize(chmp, (lbn) + 1))           \
            ? (chmp)->chm_fs_bsize                                            \
-           : (fragroundup(chmp, blkoff(chmp, (ip)->size))))
+           : (fragroundup(chmp, chfs_blkoff(chmp, (ip)->size))))
 
 /* calculates roundup(size, chmp->chm_chm_fs_bsize) */
 #define        blkroundup(chmp, size)                                                \
@@ -688,8 +688,8 @@
                        break;
                lbn = lblkno(chmp, uio->uio_offset);
                nextlbn = lbn + 1;
-               size = blksize(chmp, ip, lbn);
-               blkoffset = blkoff(chmp, uio->uio_offset);
+               size = chfs_blksize(chmp, ip, lbn);
+               blkoffset = chfs_blkoff(chmp, uio->uio_offset);
                xfersize = MIN(MIN(chmp->chm_fs_bsize - blkoffset, uio->uio_resid),
                    bytesinfile);
 
@@ -697,7 +697,7 @@
                        error = bread(vp, lbn, size, NOCRED, 0, &bp);
                        dbg("after bread\n");
                } else {
-                       int nextsize = blksize(chmp, ip, nextlbn);
+                       int nextsize = chfs_blksize(chmp, ip, nextlbn);
                        dbg("size: %ld\n", size);
                        error = breadn(vp, lbn,
                            size, &nextlbn, &nextsize, 1, NOCRED, 0, &bp);
@@ -846,7 +846,7 @@
                MAX(osize, uio->uio_offset)));
        aflag = ioflag & IO_SYNC ? B_SYNC : 0;
        nsize = MAX(osize, uio->uio_offset + uio->uio_resid);
-       endallocoff = nsize - blkoff(chmp, nsize);
+       endallocoff = nsize - chfs_blkoff(chmp, nsize);
 
        /*
         * if we're increasing the file size, deal with expanding
@@ -882,7 +882,7 @@
                }
 
                oldoff = uio->uio_offset;
-               blkoffset = blkoff(chmp, uio->uio_offset);
+               blkoffset = chfs_blkoff(chmp, uio->uio_offset);
                bytelen = MIN(chmp->chm_fs_bsize - blkoffset, uio->uio_resid);
                if (bytelen == 0) {
                        break;
@@ -898,12 +898,12 @@
                overwrite = uio->uio_offset >= preallocoff &&
                    uio->uio_offset < endallocoff;
                if (!overwrite && (vp->v_vflag & VV_MAPPED) == 0 &&
-                   blkoff(chmp, uio->uio_offset) == 0 &&
+                   chfs_blkoff(chmp, uio->uio_offset) == 0 &&
                    (uio->uio_offset & PAGE_MASK) == 0) {
                        vsize_t len;
 
                        len = trunc_page(bytelen);
-                       len -= blkoff(chmp, len);
+                       len -= chfs_blkoff(chmp, len);
                        if (len > 0) {
                                overwrite = true;
                                bytelen = len;



Home | Main Index | Thread Index | Old Index