xfs
[Top] [All Lists]

Re: [PATCH] kill no-op buf macros

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [PATCH] kill no-op buf macros
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sun, 30 Jul 2006 23:03:09 -0500
Cc: dgc@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20060731090815.B2280998@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <44CC2A55.6030207@xxxxxxxxxxx> <20060731090815.B2280998@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)
Nathan Scott wrote:

#define XFS_BUF_ISUNINITIAL(bp) (0)

This can go, unwritten extents don't use this interface on Linux.

#define XFS_BUF_BP_ISMAPPED(bp) (1)

*nod* - looks like it should go.

(could you regen the patch with just these two for now?  they are
pretty much self-contained changes, and nice 'n small)

Ok, here it is, not so interesting :)

-Eric
Remove a couple of unused BUF macros

Signed-Off-By: Eric Sandeen <sandeen@xxxxxxxxxxx>

Index: xfs-linux/linux-2.4/xfs_buf.h
===================================================================
--- xfs-linux.orig/linux-2.4/xfs_buf.h
+++ xfs-linux/linux-2.4/xfs_buf.h
@@ -380,10 +380,6 @@ BUFFER_FNS(Delay, delay)
 #define XFS_BUF_WRITE(bp)      ((bp)->b_flags |= XBF_WRITE)
 #define XFS_BUF_UNWRITE(bp)    ((bp)->b_flags &= ~XBF_WRITE)
 
-#define XFS_BUF_ISUNINITIAL(bp)        (0)
-
-#define XFS_BUF_BP_ISMAPPED(bp)        (1)
-
 #define XFS_BUF_DATAIO(bp)     ((bp)->b_flags |= XBF_FS_DATAIOD)
 #define XFS_BUF_UNDATAIO(bp)   ((bp)->b_flags &= ~XBF_FS_DATAIOD)
 
Index: xfs-linux/linux-2.6/xfs_buf.h
===================================================================
--- xfs-linux.orig/linux-2.6/xfs_buf.h
+++ xfs-linux/linux-2.6/xfs_buf.h
@@ -296,10 +296,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c
 #define XFS_BUF_WRITE(bp)      ((bp)->b_flags |= XBF_WRITE)
 #define XFS_BUF_UNWRITE(bp)    ((bp)->b_flags &= ~XBF_WRITE)
 
-#define XFS_BUF_ISUNINITIAL(bp)        (0)
-
-#define XFS_BUF_BP_ISMAPPED(bp)        (1)
-
 #define XFS_BUF_IODONE_FUNC(bp)                        ((bp)->b_iodone)
 #define XFS_BUF_SET_IODONE_FUNC(bp, func)      ((bp)->b_iodone = (func))
 #define XFS_BUF_CLR_IODONE_FUNC(bp)            ((bp)->b_iodone = NULL)
Index: xfs-linux/xfs_buf_item.c
===================================================================
--- xfs-linux.orig/xfs_buf_item.c
+++ xfs-linux/xfs_buf_item.c
@@ -234,7 +234,6 @@ xfs_buf_item_format(
        ASSERT((bip->bli_flags & XFS_BLI_LOGGED) ||
               (bip->bli_flags & XFS_BLI_STALE));
        bp = bip->bli_buf;
-       ASSERT(XFS_BUF_BP_ISMAPPED(bp));
        vecp = log_vector;
 
        /*
@@ -901,7 +900,6 @@ xfs_buf_item_relse(
        XFS_BUF_SET_FSPRIVATE(bp, bip->bli_item.li_bio_list);
        if ((XFS_BUF_FSPRIVATE(bp, void *) == NULL) &&
            (XFS_BUF_IODONE_FUNC(bp) != NULL)) {
-               ASSERT((XFS_BUF_ISUNINITIAL(bp)) == 0);
                XFS_BUF_CLR_IODONE_FUNC(bp);
        }
 
<Prev in Thread] Current Thread [Next in Thread>