diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-10-01 09:40:39 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:18:00 +0200 |
commit | 1fd4033dd011a3525bacddf37ab9eac425d25c4f (patch) | |
tree | 318d374d3048ca15547b26018fea7ff86263515a /fs/btrfs/inode.c | |
parent | 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b (diff) | |
download | lwn-1fd4033dd011a3525bacddf37ab9eac425d25c4f.tar.gz lwn-1fd4033dd011a3525bacddf37ab9eac425d25c4f.zip |
btrfs: rename BTRFS_INODE_ORDERED_DATA_CLOSE flag
Commit 8d875f95da43 ("btrfs: disable strict file flushes for
renames and truncates") eliminated the notion of ordered operations and
instead BTRFS_INODE_ORDERED_DATA_CLOSE only remained as a flag
indicating that a file's content should be synced to disk in case a
file is truncated and any writes happen to it concurrently. In fact
this intendend behavior was broken until it was fixed in
f6dc45c7a93a ("Btrfs: fix filemap_flush call in btrfs_file_release").
All things considered let's give the flag a more descriptive name. Also
slightly reword comments.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 36efed0a24de..936c3137c646 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4835,11 +4835,11 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) /* * We're truncating a file that used to have good data down to - * zero. Make sure it gets into the ordered flush list so that - * any new writes get down to disk quickly. + * zero. Make sure any new writes to the file get on disk + * on close. */ if (newsize == 0) - set_bit(BTRFS_INODE_ORDERED_DATA_CLOSE, + set_bit(BTRFS_INODE_FLUSH_ON_CLOSE, &BTRFS_I(inode)->runtime_flags); truncate_setsize(inode, newsize); |