diff mbox

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

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

Commit Message

Rashika Oct. 21, 2013, 12:34 p.m. UTC
Pack the structure btrfs_free_space in free-space-cache.h to eliminate holes detected
by pahole in order to reduce space wastage. 

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 fs/btrfs/free-space-cache.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Triplett Oct. 21, 2013, 7:57 p.m. UTC | #1
On Mon, Oct 21, 2013 at 06:04:06PM +0530, Rashika Kheria wrote:
> Pack the structure btrfs_free_space in free-space-cache.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/free-space-cache.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
> index e737f92..88503a8 100644
> --- a/fs/btrfs/free-space-cache.h
> +++ b/fs/btrfs/free-space-cache.h
> @@ -28,7 +28,6 @@ struct btrfs_free_space {
>  };
>  
>  struct btrfs_free_space_ctl {
> -	spinlock_t tree_lock;
>  	struct rb_root free_space_offset;
>  	u64 free_space;
>  	int extents_thresh;
> @@ -38,6 +37,7 @@ struct btrfs_free_space_ctl {
>  	u64 start;
>  	struct btrfs_free_space_op *op;
>  	void *private;
> +	spinlock_t tree_lock;
>  };
>  
>  struct btrfs_free_space_op {
> -- 
> 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.
Zach Brown Oct. 29, 2013, 11:49 p.m. UTC | #2
On Tue, Oct 22, 2013 at 04:23:09PM +0530, Rashika Kheria wrote:
> Pack the structure btrfs_free_space in free-space-cache.h to eliminate holes detected
> by pahole in order to reduce space wastage.

If you want to keep working on the structure packing patches, resend the
patches with a commit message that describes the hole that's fixed and
include the relevant pahole output before and after as supporting
evidence.

- z
diff mbox

Patch

diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index e737f92..88503a8 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -28,7 +28,6 @@  struct btrfs_free_space {
 };
 
 struct btrfs_free_space_ctl {
-	spinlock_t tree_lock;
 	struct rb_root free_space_offset;
 	u64 free_space;
 	int extents_thresh;
@@ -38,6 +37,7 @@  struct btrfs_free_space_ctl {
 	u64 start;
 	struct btrfs_free_space_op *op;
 	void *private;
+	spinlock_t tree_lock;
 };
 
 struct btrfs_free_space_op {