* [PATCH] Remove XFS_BUF_SHUT() and friends
@ 2008-12-04 7:27 Lachlan McIlroy
2008-12-04 13:27 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Lachlan McIlroy @ 2008-12-04 7:27 UTC (permalink / raw)
To: xfs-oss
Code does nothing so remove it.
--- a/fs/xfs/linux-2.6/xfs_buf.h 2008-12-04 14:24:12.000000000 +1100
+++ b/fs/xfs/linux-2.6/xfs_buf.h 2008-12-04 14:24:22.000000000 +1100
@@ -311,10 +311,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c
#define XFS_BUF_UNORDERED(bp) ((bp)->b_flags &= ~XBF_ORDERED)
#define XFS_BUF_ISORDERED(bp) ((bp)->b_flags & XBF_ORDERED)
-#define XFS_BUF_SHUT(bp) do { } while (0)
-#define XFS_BUF_UNSHUT(bp) do { } while (0)
-#define XFS_BUF_ISSHUT(bp) (0)
-
#define XFS_BUF_HOLD(bp) xfs_buf_hold(bp)
#define XFS_BUF_READ(bp) ((bp)->b_flags |= XBF_READ)
#define XFS_BUF_UNREAD(bp) ((bp)->b_flags &= ~XBF_READ)
--- a/fs/xfs/xfs_buf_item.c 2008-12-04 14:24:12.000000000 +1100
+++ b/fs/xfs/xfs_buf_item.c 2008-12-04 14:13:32.000000000 +1100
@@ -998,21 +1000,7 @@ xfs_buf_iodone_callbacks(
xfs_buf_do_callbacks(bp, lip);
XFS_BUF_SET_FSPRIVATE(bp, NULL);
XFS_BUF_CLR_IODONE_FUNC(bp);
-
- /*
- * XFS_SHUT flag gets set when we go thru the
- * entire buffer cache and deliberately start
- * throwing away delayed write buffers.
- * Since there's no biowait done on those,
- * we should just brelse them.
- */
- if (XFS_BUF_ISSHUT(bp)) {
- XFS_BUF_UNSHUT(bp);
- xfs_buf_relse(bp);
- } else {
- xfs_biodone(bp);
- }
-
+ xfs_biodone(bp);
return;
}
--- a/fs/xfs/xfs_inode.c 2008-12-04 14:24:12.000000000 +1100
+++ b/fs/xfs/xfs_inode.c 2008-12-04 14:21:54.000000000 +1100
@@ -3089,7 +3089,6 @@ cluster_corrupt_out:
XFS_BUF_CLR_BDSTRAT_FUNC(bp);
XFS_BUF_UNDONE(bp);
XFS_BUF_STALE(bp);
- XFS_BUF_SHUT(bp);
XFS_BUF_ERROR(bp,EIO);
xfs_biodone(bp);
} else {
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Remove XFS_BUF_SHUT() and friends
2008-12-04 7:27 [PATCH] Remove XFS_BUF_SHUT() and friends Lachlan McIlroy
@ 2008-12-04 13:27 ` Christoph Hellwig
2008-12-05 3:52 ` Lachlan McIlroy
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2008-12-04 13:27 UTC (permalink / raw)
To: Lachlan McIlroy; +Cc: xfs-oss
On Thu, Dec 04, 2008 at 06:27:16PM +1100, Lachlan McIlroy wrote:
> Code does nothing so remove it.
Looks good to me. Does anyone remember why this flag was set on IRIX?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Remove XFS_BUF_SHUT() and friends
2008-12-04 13:27 ` Christoph Hellwig
@ 2008-12-05 3:52 ` Lachlan McIlroy
2008-12-17 14:20 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Lachlan McIlroy @ 2008-12-05 3:52 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs-oss
Christoph Hellwig wrote:
> On Thu, Dec 04, 2008 at 06:27:16PM +1100, Lachlan McIlroy wrote:
>> Code does nothing so remove it.
>
> Looks good to me. Does anyone remember why this flag was set on IRIX?
During a forced shutdown we would go through all incore buffers and mark
them B_STALE/B_ERROR/B_SHUT and then call biodone() on them. The code in
xfs_buf_iodone_callbacks() that checks for B_SHUT is to avoid a double
biodone() I think. We don't have the code in the Linux port that scans
through all the incore buffers on a forced shutdown but we still have one
case in xfs_iflush_cluster(). In any case it's not doing anything.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Remove XFS_BUF_SHUT() and friends
2008-12-05 3:52 ` Lachlan McIlroy
@ 2008-12-17 14:20 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2008-12-17 14:20 UTC (permalink / raw)
To: Lachlan McIlroy; +Cc: Christoph Hellwig, xfs-oss
On Fri, Dec 05, 2008 at 02:52:47PM +1100, Lachlan McIlroy wrote:
> Christoph Hellwig wrote:
> > On Thu, Dec 04, 2008 at 06:27:16PM +1100, Lachlan McIlroy wrote:
> >> Code does nothing so remove it.
> >
> > Looks good to me. Does anyone remember why this flag was set on IRIX?
>
> During a forced shutdown we would go through all incore buffers and mark
> them B_STALE/B_ERROR/B_SHUT and then call biodone() on them. The code in
> xfs_buf_iodone_callbacks() that checks for B_SHUT is to avoid a double
> biodone() I think. We don't have the code in the Linux port that scans
> through all the incore buffers on a forced shutdown but we still have one
> case in xfs_iflush_cluster(). In any case it's not doing anything.
Ok.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-17 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 7:27 [PATCH] Remove XFS_BUF_SHUT() and friends Lachlan McIlroy
2008-12-04 13:27 ` Christoph Hellwig
2008-12-05 3:52 ` Lachlan McIlroy
2008-12-17 14:20 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox