xfs
[Top] [All Lists]

Re: [PATCH 37/37] xfs: make XBF_MAPPED the default behaviour

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 37/37] xfs: make XBF_MAPPED the default behaviour
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Wed, 25 Apr 2012 15:09:05 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1335160747-17254-38-git-send-email-david@xxxxxxxxxxxxx>
References: <1335160747-17254-1-git-send-email-david@xxxxxxxxxxxxx> <1335160747-17254-38-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
PS.
On 04/23/12 00:59, Dave Chinner wrote:
From: Dave Chinner<dchinner@xxxxxxxxxx>

Rather than specifying XBF_MAPPED for almost all buffers, introduce
XBF_UNMAPPED for the couple of users that use unmapped buffers.

Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>
---
  fs/xfs/xfs_buf.c         |   28 +++++++++++++---------------
  fs/xfs/xfs_buf.h         |    4 ++--
  fs/xfs/xfs_fsops.c       |   10 +++++-----
  fs/xfs/xfs_inode.c       |    1 +
  fs/xfs/xfs_log_recover.c |    4 ++--
  fs/xfs/xfs_trans_buf.c   |    6 ------
  fs/xfs/xfs_vnodeops.c    |    3 +--
  7 files changed, 24 insertions(+), 32 deletions(-)

diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
@@ -707,7 +707,6 @@ xfs_buf_set_empty(
        bp->b_length = numblks;
        bp->b_io_length = numblks;
        bp->b_bn = XFS_BUF_DADDR_NULL;
-       bp->b_flags&= ~XBF_MAPPED;
  }


I know that bp->baddr is set to NULL and denotes that this is not
mapped, but why not set the XBF_UNMAPPED?

  static inline struct page *
@@ -759,7 +758,6 @@ xfs_buf_associate_memory(

        bp->b_io_length = BTOBB(len);
        bp->b_length = BTOBB(buflen);
-       bp->b_flags |= XBF_MAPPED;

        return 0;
  }

I think the answer is no, but can XBF_UNMAPPED be set and leaked here?

Thanks

--Mark Tinguely

<Prev in Thread] Current Thread [Next in Thread>