* [PATCH] vfs: Export do_fallocate() to kernel modules @ 2011-08-23 21:47 Thieu Le 2011-08-23 21:59 ` Al Viro 0 siblings, 1 reply; 3+ messages in thread From: Thieu Le @ 2011-08-23 21:47 UTC (permalink / raw) To: viro; +Cc: linux-fsdevel, linux-kernel, Thieu Le Export do_fallocate() so layered file systems such as ecryptfs can take advantage of this interface. Existing interfaces to the fallocate facilities require a file descriptor which is not available to layered file systems. Signed-off-by: Thieu Le <thieule@chromium.org> --- fs/open.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/open.c b/fs/open.c index f711921..5c3bcba 100644 --- a/fs/open.c +++ b/fs/open.c @@ -268,6 +268,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) return file->f_op->fallocate(file, mode, offset, len); } +EXPORT_SYMBOL_GPL(do_fallocate); SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) { -- 1.7.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] vfs: Export do_fallocate() to kernel modules 2011-08-23 21:47 [PATCH] vfs: Export do_fallocate() to kernel modules Thieu Le @ 2011-08-23 21:59 ` Al Viro [not found] ` <CAEcckGqfDUt=b9gdQAJHug__eht2tQymg95UXp3rERBp+oyDvg@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Al Viro @ 2011-08-23 21:59 UTC (permalink / raw) To: Thieu Le; +Cc: linux-fsdevel, linux-kernel On Tue, Aug 23, 2011 at 02:47:55PM -0700, Thieu Le wrote: > Export do_fallocate() so layered file systems such as ecryptfs can take > advantage of this interface. Existing interfaces to the fallocate > facilities require a file descriptor which is not available to layered > file systems. Details, please. do_fallocate() does shitloads of checks, probably pointless for ecryptfs and its ilk, but I want to see users for that export before I can say whether it's OK or not. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAEcckGqfDUt=b9gdQAJHug__eht2tQymg95UXp3rERBp+oyDvg@mail.gmail.com>]
* Re: [PATCH] vfs: Export do_fallocate() to kernel modules [not found] ` <CAEcckGqfDUt=b9gdQAJHug__eht2tQymg95UXp3rERBp+oyDvg@mail.gmail.com> @ 2011-08-23 22:13 ` Thieu Le 0 siblings, 0 replies; 3+ messages in thread From: Thieu Le @ 2011-08-23 22:13 UTC (permalink / raw) To: Al Viro; +Cc: linux-fsdevel, linux-kernel [Resending in text format] ecryptfs, in the past, uses a write-through cache model. Whenever an application writes data to the file system, ecryptfs would encrypt the entire page and write it to the lower file system. So in the case where an application performs multiple writes to the same page, ecryptfs would encrypt the entire page for each write. Recently, ecryptfs moved to a write-back model where it would only encrypt the page when the page is flushed to disk, thereby reducing the number of encryption operations. However, if the lower file system is low on disk space, the delayed write by ecryptfs to the lower file may fail with -ENOSPC. In order to prevent this, ecryptfs needs to efficiently preallocate the space in the lower file which is why the need for fallocate. On Tue, Aug 23, 2011 at 2:59 PM, Al Viro <viro@zeniv.linux.org.uk> wrote: > > On Tue, Aug 23, 2011 at 02:47:55PM -0700, Thieu Le wrote: > > Export do_fallocate() so layered file systems such as ecryptfs can take > > advantage of this interface. Existing interfaces to the fallocate > > facilities require a file descriptor which is not available to layered > > file systems. > > Details, please. do_fallocate() does shitloads of checks, probably pointless > for ecryptfs and its ilk, but I want to see users for that export before > I can say whether it's OK or not. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-23 22:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23 21:47 [PATCH] vfs: Export do_fallocate() to kernel modules Thieu Le
2011-08-23 21:59 ` Al Viro
[not found] ` <CAEcckGqfDUt=b9gdQAJHug__eht2tQymg95UXp3rERBp+oyDvg@mail.gmail.com>
2011-08-23 22:13 ` Thieu Le
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).