'btrfs_qgroup_info_item' by 'qgroup_info'. In addition in alloc_cnt()
'generation' is set but not used after that so remove the relevant code.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
v2:
remove, "Signed-off-by: Zach Brown <z...@redhat.com>" which was for
below patc
This is a same patch as Zach Brown's but we lost so I resend it based on
current code.
- 'commit 2cd95f945a61 ("fix endian bugs in chunk rebuilding")'
Signed-off-by: Zach Brown <z...@redhat.com>
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
chunk-recover.c | 8 ++
Fix the code assigning 0 to pointer instead of NULL.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
cmds-fi-usage.c | 12 ++--
props.c | 2 +-
qgroup.c| 6 --
utils.c | 4 ++--
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
btrfs-show-super.c | 4 ++--
qgroup-verify.c| 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index c0ffeacb928c..f11701539d1a 100644
--- a/btrfs-show-super.c
+++ b
In update_super() 'chunk->stripe.devid' and 'super->dev_item.devid' both
are little endian. So we should not use endian helper
btrfs_set_stack_stripe_devid().
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
btrfs-image.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
so there could be some my
misunderstanding and better solution.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 85b45e5bee3b..3b98709f31a5 100644
--- a/Makefile.in
data:
remove, "Signed-off-by: Zach Brown <z...@redhat.com>" which was for
below patch but added by mistake.
'[PATCH 4/6] btrfs-progs: fix endian bugs in chunk rebuilding'
Byongho Lee (6):
btrfs-progs: get sparse checking working
btrfs-progs: use NULL instead of
In update_super() 'chunk->stripe.devid' and 'super->dev_item.devid' both
are little endian. So we should not use endian helper
btrfs_set_stack_stripe_devid().
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
btrfs-image.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
This is a same patch as Zach Brown's but we lost so I resend it based on
current code.
- 'commit 2cd95f945a61 ("fix endian bugs in chunk rebuilding")'
Signed-off-by: Zach Brown <z...@redhat.com>
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
chunk-recover.c | 8 ++
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
btrfs-show-super.c | 4 ++--
qgroup-verify.c| 8
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index c0ffeacb928c..f11701539d1a 100644
--- a/btrfs-show-super.c
+++ b
there could be some my
misunderstanding and better solution.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 85b45e5bee3b..3b98709f31a5 100644
--- a/Makefile.in
+++ b/Makef
'btrfs_qgroup_info_item' by 'qgroup_info'. In addition in alloc_cnt()
'generation' is set but not used after that so remove the relevant code.
Signed-off-by: Zach Brown <z...@redhat.com>
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
qgroup-verify.c | 28 +---
1 file
This is a patch-set after getting running sparse.
There are two endian patches one is new and the other is Zach Brown's work
but we lost. And rest are just for clean-ups.
Byongho Lee (6):
btrfs-progs: get sparse checking working
btrfs-progs: use NULL instead of 0
btrfs-progs: make private
Fix the code assigning 0 to pointer instead of NULL.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
cmds-fi-usage.c | 12 ++--
props.c | 2 +-
qgroup.c| 6 --
utils.c | 4 ++--
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git
I'ms sorry.
While writing cover-letter I missed to add prefix 'btrfs-progs' in subject.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
' kind of expression with
single 'SZ_xxxMB' if 'xxx' is a power of 2 then 'xxx * SZ_1M' if 'xxx' is
not a power of 2. And I haven't touched to '4096' & '8192' because it's
more intuitive than 'SZ_4KB' & 'SZ_8KB'.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
fs
comp_workspace_wait[BTRFS_COMPRESS_TYPES]
BTW, while accessing one compress type of these variables, the next or
before address is other compress types of it.
So this patch puts these variables in a struct to make cache friendly.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
V2: Apply D
comp_workspace_wait[BTRFS_COMPRESS_TYPES]
BTW, while accessing one compress type of these variables, the next or
before address is other compress types of it.
So this patch puts these variables in a struct to make cache friendly.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
fs
David Sterba writes:
>
>> +static struct {
>> +struct list_head idle_workspace;
>> +spinlock_t workspace_lock;
>> +int num_workspace;
>> +atomic_t alloc_workspace;
>> +wait_queue_head_t workspace_wait;
>> +} comp[BTRFS_COMPRESS_TYPES];
>
> The name became too generic, please
This patch eliminates the last item of prop_handlers array which is used
to check end of array and instead uses ARRAY_SIZE macro.
Though this is a very tiny optimization, using ARRAY_SIZE macro is a
good practice to iterate array.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
fs
We can safely iterate whole list items, without using list_del macro.
So remove the list_del call.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
fs/btrfs/inode.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index bda3c41dc9d5..fe42e3
There is no removing list element while iterating over list.
So, replace list_for_each_entry_safe to list_for_each_entry.
Signed-off-by: Byongho Lee <bhlee.ker...@gmail.com>
---
fs/btrfs/ioctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs
In btrfs-map-logical main(), strdup() allocates memory to output_file,
but that memory is not freed.
So add missing free() calls before return.
Signed-off-by: Byongho Lee bhlee.ker...@gmail.com
---
btrfs-map-logical.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/btrfs-map-logical.c b
1. fix memory leak in btrfs-convert main()
2. fix memory leak in btrfs-map-logical main()
3. add memory allocation fail check in btrfs_add_to_fsid()
Byongho Lee (3):
btrfs-progs: fix memory leak in btrfs-convert main()
btrfs-progs: fix memory leak in btrfs-map-logical main()
btrfs-progs
and
strncpy().
And btrfs-convert main() guarantees that string length of fslabel is not
to exceed 'BTRFS_LABEL_SIZE', so it's enough to use strcpy() instead of
strncpy() to copy fslabel in do_convert().
Signed-off-by: Byongho Lee bhlee.ker...@gmail.com
---
btrfs-convert.c | 9 +
1 file
In btrfs_add_to_fsid(), strdup() allocates memory to device-name, but
the return value is not checked.
So add the return value check and error handling code.
And clean-up error handling code for ENOMEM case.
Signed-off-by: Byongho Lee bhlee.ker...@gmail.com
---
utils.c | 20
This patch includes below fixes in error path:
1. fix memory leaks if realloc() fails
2. add missing call free_history() before return error in scrub_read_file()
Signed-off-by: Byongho Lee bhlee.ker...@gmail.com
---
changelog:
v2:
Add one more fix for memory leak when realloc() fails by Zhao
Zhao Lei writes:
Hi, Byongho Lee
-Original Message-
From: linux-btrfs-ow...@vger.kernel.org
[mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Byongho Lee
Sent: Friday, August 21, 2015 11:10 AM
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: fix memory leaks
'btrfs_fs_info' and its
initialization code.
Signed-off-by: Byongho Lee bhlee.ker...@gmail.com
---
fs/btrfs/ctree.h | 6 --
fs/btrfs/disk-io.c | 1 -
2 files changed, 7 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index aac314e14188..cdde6d541b3a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs
29 matches
Mail list logo