• David Sterba's avatar
    btrfs: always pass readahead state to defrag · df2825e9
    David Sterba authored
    Defrag ioctl passes readahead from the file, but autodefrag does not
    have a file so the readahead state is allocated when needed.
    
    The autodefrag loop in cleaner thread iterates over inodes so we can
    simply provide an on-stack readahead state and will not need to allocate
    it in btrfs_defrag_file(). The size is 32 bytes which is acceptable.
    Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    df2825e9
defrag.c 39.6 KB