linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Dustin Kirkland <kirkland@canonical.com>,
	ecryptfs-devel@lists.launchpad.net
Subject: Re: [PATCH] eCryptfs: Use notify_change for truncating lower inodes
Date: Sun, 25 Oct 2009 08:22:19 +0100	[thread overview]
Message-ID: <20091025072219.GC17121@lst.de> (raw)
In-Reply-To: <1255580377-16577-1-git-send-email-tyhicks@linux.vnet.ibm.com>

On Wed, Oct 14, 2009 at 11:19:37PM -0500, Tyler Hicks wrote:
> When truncating inodes in the lower filesystem, eCryptfs directly
> invoked vmtruncate(). As Christoph Hellwig pointed out, vmtruncate() is
> a filesystem helper function, but filesystems may need to do more than
> just a call to vmtruncate().
> 
> This patch moves the lower inode truncation out of ecryptfs_truncate()
> and renames the function to truncate_upper().  truncate_upper() updates
> an iattr for the lower inode to indicate if the lower inode needs to be
> truncated upon return.  ecryptfs_setattr() then calls notify_change(),
> using the updated iattr for the lower inode, to complete the truncation.
> 
> For eCryptfs functions needing to truncate, ecryptfs_truncate() is
> reintroduced as a simple way to truncate the upper inode to a specified
> size and then truncate the lower inode accordingly.

Thanks, this looks correct to me from glacing over it.

      parent reply	other threads:[~2009-10-25  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 15:12 truncate in ecryptfs Christoph Hellwig
2009-10-14 15:37 ` Tyler Hicks
2009-10-15  4:19   ` [PATCH] eCryptfs: Use notify_change for truncating lower inodes Tyler Hicks
2009-10-15 16:55     ` Dustin Kirkland
2009-10-25  7:22     ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091025072219.GC17121@lst.de \
    --to=hch@lst.de \
    --cc=ecryptfs-devel@lists.launchpad.net \
    --cc=kirkland@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tyhicks@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).