xfs
[Top] [All Lists]

Re: [PATCH] xfs: remove unused XBT_FORCE_SLEEP bit

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] xfs: remove unused XBT_FORCE_SLEEP bit
From: Ben Myers <bpm@xxxxxxx>
Date: Thu, 15 Dec 2011 17:06:05 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <4EE7DBED.8090600@xxxxxxxxxxx>
References: <4EE7DBED.8090600@xxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Dec 13, 2011 at 05:12:45PM -0600, Eric Sandeen wrote:
> XBT_FORCE_SLEEP is no longer ever tested; it is only set
> and cleared.  Remove it.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Yep... looks like XBT_FORCE_SLEEP is never tested.
Reviewed-by: Ben Myers <bpm@xxxxxxx>

> ---
> 
> p.s. I left bt_flags as a bitfield even with only one bit defined now... OK?
> 
> diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
> index 5e68099..f7830c3 100644
> --- a/fs/xfs/linux-2.6/xfs_buf.c
> +++ b/fs/xfs/linux-2.6/xfs_buf.c
> @@ -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))
> diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
> index 50a7d5f..1b4aec1 100644
> --- a/fs/xfs/linux-2.6/xfs_buf.h
> +++ b/fs/xfs/linux-2.6/xfs_buf.h
> @@ -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
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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