Skip to contentSkip to conversation

xfs: remove unused XBT_FORCE_SLEEP bit

PATCH In review Eric Sandeen 3 participants 3 messages Dec 13, 2011 – Dec 15, 2011 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: remove unused XBT_FORCE_SLEEP bit

XBT_FORCE_SLEEP is no longer ever tested; it is only set and cleared. Remove it.

---

p.s. I left bt_flags as a bitfield even with only one bit defined now... OK?

fs/xfs/linux-2.6/xfs_buf.c +1 -5
index 5e68099..f7830c3 100644
@@ -1762,12 +1762,8 @@ xfsbufd(
 		struct list_head tmp;
 		struct blk_plug plug;
 
-		if (unlikely(freezing(current))) {
-			set_bit(XBT_FORCE_SLEEP, &target->bt_flags);
+		if (unlikely(freezing(current)))
 			refrigerator();
-		} else {
-			clear_bit(XBT_FORCE_SLEEP, &target->bt_flags);
-		}
 
 		/* sleep for a long time if there is nothing to do. */
 		if (list_empty(&target->bt_delwrite_queue))
fs/xfs/linux-2.6/xfs_buf.h +1 -2
index 50a7d5f..1b4aec1 100644
@@ -87,8 +87,7 @@ typedef unsigned int xfs_buf_flags_t;
 	{ _XBF_DELWRI_Q,	"DELWRI_Q" }
 
 typedef enum {
-	XBT_FORCE_SLEEP = 0,
-	XBT_FORCE_FLUSH = 1,
+	XBT_FORCE_FLUSH = 0,
 } xfs_buftarg_flags_t;
 
 typedef struct xfs_bufhash {

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eric Sandeen

XBT_FORCE_SLEEP is no longer ever tested; it is only set and cleared. Remove it.

---

p.s. I left bt_flags as a bitfield even with only one bit defined now... OK?

Fine by me. The plan is to remove the xfsbufd completely (by doing all metadata writeback from the AIL), anyway, so leaving it as a bit field for the moment is not a problem...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#2 lore raw
In reply to Eric Sandeen
Quoted 4 lines · Eric Sandeen

XBT_FORCE_SLEEP is no longer ever tested; it is only set and cleared. Remove it.

Yep... looks like XBT_FORCE_SLEEP is never tested.

Quoted 38 lines

---

p.s. I left bt_flags as a bitfield even with only one bit defined now... OK?

fs/xfs/linux-2.6/xfs_buf.c +1 -5
index 5e68099..f7830c3 100644
@@ -1762,12 +1762,8 @@ xfsbufd(
 		struct list_head tmp;
 		struct blk_plug plug;
 
-		if (unlikely(freezing(current))) {
-			set_bit(XBT_FORCE_SLEEP, &target->bt_flags);
+		if (unlikely(freezing(current)))
 			refrigerator();
-		} else {
-			clear_bit(XBT_FORCE_SLEEP, &target->bt_flags);
-		}
 
 		/* sleep for a long time if there is nothing to do. */
 		if (list_empty(&target->bt_delwrite_queue))
fs/xfs/linux-2.6/xfs_buf.h +1 -2
index 50a7d5f..1b4aec1 100644
@@ -87,8 +87,7 @@ typedef unsigned int xfs_buf_flags_t;
 	{ _XBF_DELWRI_Q,	"DELWRI_Q" }
 
 typedef enum {
-	XBT_FORCE_SLEEP = 0,
-	XBT_FORCE_FLUSH = 1,
+	XBT_FORCE_FLUSH = 0,
 } xfs_buftarg_flags_t;
 
 typedef struct xfs_bufhash {
Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs