• Jaegeuk Kim's avatar
    f2fs: factor out victim_entry usage from general rb_tree use · 043d2d00
    Jaegeuk Kim authored
    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: 093749e2 ("f2fs: support age threshold based garbage collection")
    Reviewed-by: default avatarChao Yu <chao@kernel.org>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    043d2d00
extent_cache.c 31.2 KB