diff options
author | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2011-04-14 22:35:11 +0200 |
---|---|---|
committer | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2011-04-26 01:32:37 +0200 |
commit | 332ab16f830f59e7621ae8eb2c353dc135a316f6 (patch) | |
tree | c5b249f34dcacf2aa5ee24de8d332d8171398203 /include/scsi/osd_attributes.h | |
parent | eCryptfs: dput dentries returned from dget_parent (diff) | |
download | linux-332ab16f830f59e7621ae8eb2c353dc135a316f6.tar.xz linux-332ab16f830f59e7621ae8eb2c353dc135a316f6.zip |
eCryptfs: Add reference counting to lower files
For any given lower inode, eCryptfs keeps only one lower file open and
multiplexes all eCryptfs file operations through that lower file. The
lower file was considered "persistent" and stayed open from the first
lookup through the lifetime of the inode.
This patch keeps the notion of a single, per-inode lower file, but adds
reference counting around the lower file so that it is closed when not
currently in use. If the reference count is at 0 when an operation (such
as open, create, etc.) needs to use the lower file, a new lower file is
opened. Since the file is no longer persistent, all references to the
term persistent file are changed to lower file.
Locking is added around the sections of code that opens the lower file
and assign the pointer in the inode info, as well as the code the fputs
the lower file when all eCryptfs users are done with it.
This patch is needed to fix issues, when mounted on top of the NFSv3
client, where the lower file is left silly renamed until the eCryptfs
inode is destroyed.
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'include/scsi/osd_attributes.h')
0 files changed, 0 insertions, 0 deletions