]> git.ipfire.org Git - people/ms/linux.git/commit - fs/ceph/addr.c
ceph: uninline the data on a file opened for writing
authorDavid Howells <dhowells@redhat.com>
Wed, 15 Dec 2021 23:48:33 +0000 (23:48 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 1 Mar 2022 17:26:36 +0000 (18:26 +0100)
commit083db6fd3e73fc4f9ee74d2da1012a94216d6a60
tree9bc6936bfd60b7c05c04abcbe225b68a8ff0d465
parent5b19f1eba45902bc75b92e9962374fc98a40e174
ceph: uninline the data on a file opened for writing

If a ceph file is made up of inline data, uninline that in the ceph_open()
rather than in ceph_page_mkwrite(), ceph_write_iter(), ceph_fallocate() or
ceph_write_begin().

This makes it easier to convert to using the netfs library for VM write
hooks.

Should this also take the inode lock for the duration on uninlining to
prevent a race with truncation?

[ jlayton: fix up folio locking, update i_inline_version after write ]

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c
fs/ceph/file.c
fs/ceph/super.h