* [PATCH 0/4] Btrfs, remove unused structure members
@ 2017-05-16 17:17 David Sterba
2017-05-16 17:17 ` [PATCH 1/4] btrfs: remove unused member err from reada_extent David Sterba
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: David Sterba @ 2017-05-16 17:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
With some help of coccinelle and coccigrep I found a few stucture members that
are completely unused, we can remove them and reduce structure sizes.
David Sterba (4):
btrfs: remove unused member err from reada_extent
btrfs: remove unused member list from async_submit_bio
btrfs: remove unused members dir_path from recorded_ref
btrfs: remove unused member list from btrfs_end_io_wq
fs/btrfs/disk-io.c | 2 --
fs/btrfs/reada.c | 1 -
fs/btrfs/send.c | 8 --------
3 files changed, 11 deletions(-)
--
2.12.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] btrfs: remove unused member err from reada_extent
2017-05-16 17:17 [PATCH 0/4] Btrfs, remove unused structure members David Sterba
@ 2017-05-16 17:17 ` David Sterba
2017-05-16 17:17 ` [PATCH 2/4] btrfs: remove unused member list from async_submit_bio David Sterba
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2017-05-16 17:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
Seems to be unused since the initial commit, we ignore readahead errors
anyway, the full read will handle that if necessary.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/reada.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index a17e775a4a89..ab852b8e3e37 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -66,7 +66,6 @@ struct reada_extctl {
struct reada_extent {
u64 logical;
struct btrfs_key top;
- int err;
struct list_head extctl;
int refcnt;
spinlock_t lock;
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] btrfs: remove unused member list from async_submit_bio
2017-05-16 17:17 [PATCH 0/4] Btrfs, remove unused structure members David Sterba
2017-05-16 17:17 ` [PATCH 1/4] btrfs: remove unused member err from reada_extent David Sterba
@ 2017-05-16 17:17 ` David Sterba
2017-05-16 17:17 ` [PATCH 3/4] btrfs: remove unused members dir_path from recorded_ref David Sterba
2017-05-16 17:17 ` [PATCH 4/4] btrfs: remove unused member list from btrfs_end_io_wq David Sterba
3 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2017-05-16 17:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The list used to track checksums in the early version (2.6.29), but I
was able not pinpoint the commit that stopped using it. Everything
apparently works without it for a long time.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/disk-io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8685d67185d0..db805632b4c0 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -120,7 +120,6 @@ void btrfs_end_io_wq_exit(void)
struct async_submit_bio {
struct inode *inode;
struct bio *bio;
- struct list_head list;
extent_submit_bio_hook_t *submit_bio_start;
extent_submit_bio_hook_t *submit_bio_done;
int mirror_num;
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] btrfs: remove unused members dir_path from recorded_ref
2017-05-16 17:17 [PATCH 0/4] Btrfs, remove unused structure members David Sterba
2017-05-16 17:17 ` [PATCH 1/4] btrfs: remove unused member err from reada_extent David Sterba
2017-05-16 17:17 ` [PATCH 2/4] btrfs: remove unused member list from async_submit_bio David Sterba
@ 2017-05-16 17:17 ` David Sterba
2017-05-16 17:17 ` [PATCH 4/4] btrfs: remove unused member list from btrfs_end_io_wq David Sterba
3 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2017-05-16 17:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The two members do not seem to be used since the initial commit.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/send.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index fc496a6f842a..e8185c83f667 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2769,12 +2769,10 @@ static int send_create_inode_if_needed(struct send_ctx *sctx)
struct recorded_ref {
struct list_head list;
- char *dir_path;
char *name;
struct fs_path *full_path;
u64 dir;
u64 dir_gen;
- int dir_path_len;
int name_len;
};
@@ -2798,12 +2796,6 @@ static int __record_ref(struct list_head *head, u64 dir,
ref->name = (char *)kbasename(ref->full_path->start);
ref->name_len = ref->full_path->end - ref->name;
- ref->dir_path = ref->full_path->start;
- if (ref->name == ref->full_path->start)
- ref->dir_path_len = 0;
- else
- ref->dir_path_len = ref->full_path->end -
- ref->full_path->start - 1 - ref->name_len;
list_add_tail(&ref->list, head);
return 0;
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] btrfs: remove unused member list from btrfs_end_io_wq
2017-05-16 17:17 [PATCH 0/4] Btrfs, remove unused structure members David Sterba
` (2 preceding siblings ...)
2017-05-16 17:17 ` [PATCH 3/4] btrfs: remove unused members dir_path from recorded_ref David Sterba
@ 2017-05-16 17:17 ` David Sterba
3 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2017-05-16 17:17 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The end io work queue items have been tracked by the work queues since
"Btrfs: Add async worker threads for pre and post IO checksumming"
(8b7128429235d9bd72cfd5e) (2008).
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/disk-io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index db805632b4c0..48b58a1f989e 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -89,7 +89,6 @@ struct btrfs_end_io_wq {
struct btrfs_fs_info *info;
int error;
enum btrfs_wq_endio_type metadata;
- struct list_head list;
struct btrfs_work work;
};
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-16 17:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16 17:17 [PATCH 0/4] Btrfs, remove unused structure members David Sterba
2017-05-16 17:17 ` [PATCH 1/4] btrfs: remove unused member err from reada_extent David Sterba
2017-05-16 17:17 ` [PATCH 2/4] btrfs: remove unused member list from async_submit_bio David Sterba
2017-05-16 17:17 ` [PATCH 3/4] btrfs: remove unused members dir_path from recorded_ref David Sterba
2017-05-16 17:17 ` [PATCH 4/4] btrfs: remove unused member list from btrfs_end_io_wq David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).