diff mbox

[OPW,kernel,3/3] fs: btrfs: Pack struct btrfs_delayed_root

Message ID 09ffaa86dcaa4b00012a17602f379cd6805c0096.1382358666.git.rashika.kheria@gmail.com
State New, archived
Headers show

Commit Message

Rashika Oct. 21, 2013, 12:35 p.m. UTC
Packs the structure btrfs_delayed_root in delayed-inode.h to eliminate holes detected
by pahole in order to reduce space wastage.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 fs/btrfs/delayed-inode.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Josh Triplett Oct. 21, 2013, 7:57 p.m. UTC | #1
On Mon, Oct 21, 2013 at 06:05:16PM +0530, Rashika Kheria wrote:
> Packs the structure btrfs_delayed_root in delayed-inode.h to eliminate holes detected
> by pahole in order to reduce space wastage.
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  fs/btrfs/delayed-inode.h |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h
> index a4b38f9..92dc5f9 100644
> --- a/fs/btrfs/delayed-inode.h
> +++ b/fs/btrfs/delayed-inode.h
> @@ -34,18 +34,18 @@
>  #define BTRFS_DELAYED_DELETION_ITEM	2
>  
>  struct btrfs_delayed_root {
> -	spinlock_t lock;
>  	struct list_head node_list;
>  	/*
>  	 * Used for delayed nodes which is waiting to be dealt with by the
>  	 * worker. If the delayed node is inserted into the work queue, we
>  	 * drop it from this list.
>  	 */
> +	wait_queue_head_t wait;
>  	struct list_head prepare_list;
> +	int nodes;		/* for delayed nodes */
>  	atomic_t items;		/* for delayed items */
>  	atomic_t items_seq;	/* for delayed items */
> -	int nodes;		/* for delayed nodes */
> -	wait_queue_head_t wait;
> +	spinlock_t lock;
>  };
>  
>  struct btrfs_delayed_node {
> -- 
> 1.7.9.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h
index a4b38f9..92dc5f9 100644
--- a/fs/btrfs/delayed-inode.h
+++ b/fs/btrfs/delayed-inode.h
@@ -34,18 +34,18 @@ 
 #define BTRFS_DELAYED_DELETION_ITEM	2
 
 struct btrfs_delayed_root {
-	spinlock_t lock;
 	struct list_head node_list;
 	/*
 	 * Used for delayed nodes which is waiting to be dealt with by the
 	 * worker. If the delayed node is inserted into the work queue, we
 	 * drop it from this list.
 	 */
+	wait_queue_head_t wait;
 	struct list_head prepare_list;
+	int nodes;		/* for delayed nodes */
 	atomic_t items;		/* for delayed items */
 	atomic_t items_seq;	/* for delayed items */
-	int nodes;		/* for delayed nodes */
-	wait_queue_head_t wait;
+	spinlock_t lock;
 };
 
 struct btrfs_delayed_node {