summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2023-03-10 10:04:26 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2023-03-29 15:17:38 -0700
commit043d2d00b44310f84c0593c63e51fae88c829cdd (patch)
tree0ea6a7f759ff88b439bc4b3550a1a085b1fdb92d /fs/f2fs/gc.h
parentc17caf0ba3aa3411b96c71b4ce24be1040b8f3e8 (diff)
downloadlinux-043d2d00b44310f84c0593c63e51fae88c829cdd.tar.gz
linux-043d2d00b44310f84c0593c63e51fae88c829cdd.tar.bz2
linux-043d2d00b44310f84c0593c63e51fae88c829cdd.zip
f2fs: factor out victim_entry usage from general rb_tree use
Let's reduce the complexity of mixed use of rb_tree in victim_entry from extent_cache and discard_cmd. This should fix arm32 memory alignment issue caused by shared rb_entry. [struct victim_entry] [struct rb_entry] [0] struct rb_node rb_node; [0] struct rb_node rb_node; union { struct { unsigned int ofs; unsigned int len; }; [16] unsigned long long mtime; [12] unsigned long long key; } __packed; Cc: <stable@vger.kernel.org> Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.h')
-rw-r--r--fs/f2fs/gc.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h
index 15bd1d680f67..5ad6ac63e13f 100644
--- a/fs/f2fs/gc.h
+++ b/fs/f2fs/gc.h
@@ -55,20 +55,10 @@ struct gc_inode_list {
struct radix_tree_root iroot;
};
-struct victim_info {
- unsigned long long mtime; /* mtime of section */
- unsigned int segno; /* section No. */
-};
-
struct victim_entry {
struct rb_node rb_node; /* rb node located in rb-tree */
- union {
- struct {
- unsigned long long mtime; /* mtime of section */
- unsigned int segno; /* segment No. */
- };
- struct victim_info vi; /* victim info */
- };
+ unsigned long long mtime; /* mtime of section */
+ unsigned int segno; /* segment No. */
struct list_head list;
};