ext4: minor defrag code improvements
authorEric Whitney <enwlinux@gmail.com>
Fri, 22 Jul 2022 16:39:10 +0000 (12:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Sep 2022 20:48:57 +0000 (16:48 -0400)
commitd412df530f77d0f61c41b83f925997452fc3944c
tree6d34baf89d140a37fa7b07151a1c1b4a1992f71e
parentdf3cb754d13d2cd5490db9b8d536311f8413a92e
ext4: minor defrag code improvements

Modify the error returns for two file types that can't be defragged to
more clearly communicate those restrictions to a caller.  When the
defrag code is applied to swap files, return -ETXTBSY, and when applied
to quota files, return -EOPNOTSUPP.  Move an extent tree search whose
results are only occasionally required to the site always requiring them
for improved efficiency.  Address a few typos.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Link: https://lore.kernel.org/r/20220722163910.268564-1-enwlinux@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/move_extent.c