Message ID | 20200312141715.550387-3-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] libxfs: turn the xfs_buf_incore stub into an inline function | expand |
On Thu, Mar 12, 2020 at 03:17:13PM +0100, Christoph Hellwig wrote: > This function doesn't exist in the kernel and is purely a stub in > xfsprogs, so remove it. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > libxfs/libxfs_priv.h | 2 -- > libxfs/xfs_sb.c | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h > index 17a0104b..723dddcd 100644 > --- a/libxfs/libxfs_priv.h > +++ b/libxfs/libxfs_priv.h > @@ -375,8 +375,6 @@ static inline struct xfs_buf *xfs_buf_incore(struct xfs_buftarg *target, > return NULL; > } > > -#define xfs_buf_oneshot(bp) ((void) 0) > - > #define XBRW_READ LIBXFS_BREAD > #define XBRW_WRITE LIBXFS_BWRITE > #define xfs_buf_zero(bp,off,len) libxfs_iomove(bp,off,len,NULL,LIBXFS_BZERO) > diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c > index 4f750d19..b931fee7 100644 > --- a/libxfs/xfs_sb.c > +++ b/libxfs/xfs_sb.c > @@ -982,7 +982,6 @@ xfs_update_secondary_sbs( > } > > bp->b_ops = &xfs_sb_buf_ops; > - xfs_buf_oneshot(bp); Removing this will cause xfsprogs' libxfs to fall further out of sync with the kernel's libxfs. Eric and I have been trying to keep that to a minimum. --D > xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); > xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb); > xfs_buf_delwri_queue(bp, &buffer_list); > @@ -1170,7 +1169,6 @@ xfs_sb_get_secondary( > if (!bp) > return -ENOMEM; > bp->b_ops = &xfs_sb_buf_ops; > - xfs_buf_oneshot(bp); > *bpp = bp; > return 0; > } > -- > 2.24.1 >
On Thu, Mar 12, 2020 at 07:53:08AM -0700, Darrick J. Wong wrote: > > index 4f750d19..b931fee7 100644 > > --- a/libxfs/xfs_sb.c > > +++ b/libxfs/xfs_sb.c > > @@ -982,7 +982,6 @@ xfs_update_secondary_sbs( > > } > > > > bp->b_ops = &xfs_sb_buf_ops; > > - xfs_buf_oneshot(bp); > > Removing this will cause xfsprogs' libxfs to fall further out of sync > with the kernel's libxfs. Eric and I have been trying to keep that to a > minimum. Oops. Somehow I was under the impression that xfs_buf_oneshot didn't exist in the kernel, but in fact it does. Feel free to skip this patch.
diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index 17a0104b..723dddcd 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -375,8 +375,6 @@ static inline struct xfs_buf *xfs_buf_incore(struct xfs_buftarg *target, return NULL; } -#define xfs_buf_oneshot(bp) ((void) 0) - #define XBRW_READ LIBXFS_BREAD #define XBRW_WRITE LIBXFS_BWRITE #define xfs_buf_zero(bp,off,len) libxfs_iomove(bp,off,len,NULL,LIBXFS_BZERO) diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index 4f750d19..b931fee7 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -982,7 +982,6 @@ xfs_update_secondary_sbs( } bp->b_ops = &xfs_sb_buf_ops; - xfs_buf_oneshot(bp); xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb); xfs_buf_delwri_queue(bp, &buffer_list); @@ -1170,7 +1169,6 @@ xfs_sb_get_secondary( if (!bp) return -ENOMEM; bp->b_ops = &xfs_sb_buf_ops; - xfs_buf_oneshot(bp); *bpp = bp; return 0; }
This function doesn't exist in the kernel and is purely a stub in xfsprogs, so remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> --- libxfs/libxfs_priv.h | 2 -- libxfs/xfs_sb.c | 2 -- 2 files changed, 4 deletions(-)