Alex Tomas wrote:
+static inline struct semaphore * lock_sem(struct inode *dir, struct qstr *name)
+{
+ if (IS_PDIROPS(dir)) {
+ struct super_block *sb;
+ /* name-hash expected to be already calculated */
+ sb = dir-i_sb;
+
Quoting Alex Tomas [EMAIL PROTECTED]:
1) i_sem protects dcache too
Where? i_sem is the per-inode lock, and shouldn't be used else.
2) tmpfs has no own data, so we can use it this way (see 2nd patch)
3) I have pdirops patch for ext3, but it needs some cleaning ...
I think you didn't get my
Quoting Alex Tomas [EMAIL PROTECTED]:
Jan Blunck (JB) writes:
1) i_sem protects dcache too
JB Where? i_sem is the per-inode lock, and shouldn't be used else.
read comments in fs/namei.c:read_lookup()
i_sem does NOT protect the dcache. Also not in real_lookup(). The lock must
Quoting Alex Tomas [EMAIL PROTECTED]:
Jan Blunck (JB) writes:
JB i_sem does NOT protect the dcache. Also not in real_lookup(). The lock
must be
JB acquired for -lookup() and because we might sleep on i_sem, we have to
get it
JB early and check for repopulation of the dcache.
dentry
This was also topic on lkml 2 weeks ago.
Zitat von Tomas Hruby [EMAIL PROTECTED]:
First of all I would like to know what exactly is the meaning of the
'offset' parameter of filldir and whether it is used somewhere? Unlike
ext2, our directories are not easily read sequentially and this value
On 1/4/07, Dave Kleikamp [EMAIL PROTECTED] wrote:
On Thu, 2007-01-04 at 12:34 +0100, Jens Nie wrote:
I think i found a bug in the ext3 filesystem. It deals with
dereferencing symlinks. I have installed a fresh openSUSE 10.2 on an
ext3 filesystem.
No, it seems to be a bug in the coreutils.
On 5/14/07, Hugh Dickins [EMAIL PROTECTED] wrote:
On Mon, 14 May 2007, Bharata B Rao wrote:
From: Jan Blunck [EMAIL PROTECTED]
Subject: tmpfs whiteout support
Introduce whiteout support to tmpfs.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
Signed-off-by: Bharata B Rao [EMAIL PROTECTED
On 5/14/07, Andreas Dilger [EMAIL PROTECTED] wrote:
On May 14, 2007 15:14 +0530, Bharata B Rao wrote:
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV0x0008 /* Journal device */
#define EXT3_FEATURE_INCOMPAT_META_BG0x0010
+#define EXT3_FEATURE_INCOMPAT_WHITEOUT
to virtually
delete (white-out) files by creating a file with this file type.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
Signed-off-by: Bharata B Rao [EMAIL PROTECTED]
---
include/linux/stat.h |2 ++
1 files changed, 2 insertions(+)
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
On 5/14/07, Jan Engelhardt [EMAIL PROTECTED] wrote:
+static inline void union_lock(struct dentry *dentry)
+{
+ if (unlikely(dentry dentry-d_union)) {
+ struct union_info *ui = dentry-d_union;
+
+ UM_DEBUG_LOCK(\%s\ locking %p (count=%d)\n,
+
On 5/15/07, Bharata B Rao [EMAIL PROTECTED] wrote:
On Mon, May 14, 2007 at 01:16:57PM -0700, Badari Pulavarty wrote:
On Mon, 2007-05-14 at 15:14 +0530, Bharata B Rao wrote:
From: Bharata B Rao [EMAIL PROTECTED]
+static int ext3_whiteout(struct inode *dir, struct dentry *dentry)
+{
+
On 5/23/07, Miklos Szeredi [EMAIL PROTECTED] wrote:
So your question is, which mount takes priority on the lookup? It
probably should be the propagated real mount, rather than the
dir-on-file one, shouldn't it?
Maybe this might belong into __link_path_walk() similar to the
handling of
On 5/23/07, Miklos Szeredi [EMAIL PROTECTED] wrote:
As for unlink... How do you deal with having that thing
mounted, mounting something _under_ it (so that vfsmount would be kept
busy) and then unlinking that sucker?
Yeah, that's a good point. Current patch doesn't deal with that.
On Wed, 20 Jun 2007 11:21:57 +0530, Bharata B Rao wrote:
+4. Union stack: building and traversal
+-- +Union stack needs to be built
from two places: during an explicit union +mount (or mount propagation)
and during the lookup of a directory that +appears in
Introduce white-out handling in the VFS.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/inode.c | 22 ++
fs/namei.c | 417 +++--
fs/readdir.c |6
include/linux/fs.h |7
4 files changed, 441 insertions(+), 11
If a dentry is removed from dentry cache because its usage count drops to
zero, the references to the underlying layer of the unions the dentry is in
are droped too. Therefore the union cache is driven by the dentry cache.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/dcache.c
From: Hugh Dickins [EMAIL PROTECTED]
Remove shmem_file_sendfile and resurrect shmem_readpage, as used by tmpfs
to support loop and sendfile in 2.4 and 2.5. Now tmpfs can support splice,
loop and sendfile in the simplest way, using generic_file_splice_read and
generic_file_splice_write (with the
read entires are compared against these for duplicates before
being they are returned to user space.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
Signed-off-by: Bharata B Rao [EMAIL PROTECTED]
---
fs/readdir.c | 11 -
fs/union.c| 336
stack when de/referencing a dentry
- caching of union stack information still driven by dentry cache
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/Kconfig |8 +
fs/Makefile|2
fs/dcache.c|4
fs/union.c | 335
Creates the proper struct union_mount when mounting something into a
union. If the topmost filesystem isn't capable of handling the white-out
filetype it could only be mount read-only.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namespace.c| 46
Introduce MNT_UNION and MS_UNION flags. You need additional patches for
util-linux for that to work.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namespace.c|6 +-
include/linux/fs.h|1 +
include/linux/mount.h |1 +
3 files changed, 7 insertions(+), 1 deletion
Some debugging code itself.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c| 26 ++
fs/union.c| 27 +++
include/linux/namei.h |4
3 files changed, 57 insertions(+)
--- a/fs/namei.c
+++ b/fs/namei.c
, follow union, follow symlinks
- single pathname component, doesn't follow mounts, follow union, doesn't
follow symlinks
- single pathname component doesn't follow mounts, doesn't follow unions,
doesn't follow symlinks
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c| 467
-off-by: Bharata B Rao [EMAIL PROTECTED]
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c| 73 ++-
fs/union.c| 312 ++
include/linux/union.h |9 +
3 files changed, 389 insertions(+), 5 deletions
to. There are different levels of debugging output available which can be ORed
together. For the valid sysctl values see include/linux/union_debug.h.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
include/linux/union_debug.h | 91 ++
lib/Kconfig.debug |9 +
lib/Makefile
This patch changes real_lookup() into returning a struct path.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c | 77 ++---
1 file changed, 48 insertions(+), 29 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -462,10 +462,11
This patch changes lookup_create() into returning a struct path.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
arch/powerpc/platforms/cell/spufs/inode.c | 15 ++
fs/namei.c| 75 +-
include/linux/dcache.h
Add copyup renaming of regular files on union mounts. Directories are still
lazyly copied with the help of user-space.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c | 133 -
fs/union.c |8 ++-
2 files changed, 129
Introduce white-out support to tmpfs.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
include/linux/shmem_fs.h |1
mm/shmem.c | 54 +++
2 files changed, 55 insertions(+)
--- a/include/linux/shmem_fs.h
+++ b/include/linux
SuS v2 requires we report a read only fs too. For union-mounts this is a very
expensive check. So I'm lazy and just disable the check if we are on a lower
layer of an union.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/open.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
This patch changes lookup_hash() into returning a struct path.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c | 113 ++---
1 file changed, 57 insertions(+), 56 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1297,27
__d_kill_final() is called. __d_kill_final() is actually doing the
dentry_iput() and is also dereferencing the parent.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/dcache.c | 60 +++-
1 file changed, 55 insertions(+), 5 deletions(-)
--- a/fs
Introduce whiteout support for ext3.
- Needs a reserved inode number for white-outs
- S_OPAQUE isn't persistently stored
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/ext3/dir.c |3 ++-
fs/ext3/namei.c | 33 +
fs/ext3/super.c
Introduce white-out support to ext2.
Known Bugs:
- Needs a reserved inode number for white-outs
- S_OPAQUE isn't persistently stored
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/ext2/dir.c |2 ++
fs/ext2/namei.c | 18 ++
fs/ext2/super.c
When files on an upper layer of the union stack are removed we need to
white-out the removed filename.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namei.c | 46 --
1 file changed, 44 insertions(+), 2 deletions(-)
--- a/fs/namei.c
+++ b/fs
Here is another post of the VFS based union mount implementation. Unlike the
traditional mount which hides the contents of the mount point, union mounts
present the merged view of the mount point and the mounted filesytem.
Recent changes:
- brand new union structure no longer tied to the dentryn,
Add simple documentation about union mounting in general and this
implementation in specific.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
Documentation/filesystems/union-mounts.txt | 172 +
1 file changed, 172 insertions(+)
--- /dev/null
+++ b/Documentation
Export lives_below_in_same_fs() for use in union mount code.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/namespace.c|3 ++-
include/linux/mount.h |1 +
2 files changed, 3 insertions(+), 1 deletion(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -793,7 +793,7 @@ static
This is a first try to move readdir() to become an inode operation. This is
necessary for a VFS implementation of something like union-mounts where a
readdir() needs to read the directory contents of multiple directories.
Besides that the new interface is no longer giving the struct file to the
: the dentry of the directory
@pos: pointer to the cookie
@private: the credentials (at the moment it is still filp-private_data
@filler: the filldir to call
@dirent: the dirent buffer
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/readdir.c | 14 --
include/linux/fs.h |2
This patch changes dcache_readdir() to the new inode operations readdir
interface. Hence all the users of libfs.c are changed to use the new interface
too.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
---
fs/autofs4/autofs_i.h |5 ++---
fs/autofs4/root.c | 41
On Mon, Nov 05, Jörn Engel wrote:
Subject: Embed a struct path into struct nameidata instead of
nd-{dentry,mnt}
From: Jan Blunck [EMAIL PROTECTED]
Switch from nd-{dentry,mnt} to nd-path.{dentry,mnt} everywhere.
Signed-off-by: Jan Blunck [EMAIL PROTECTED]
Signed-off-by: Andreas
On Tue, Nov 06, Jörn Engel wrote:
This is a cleanup series. In mostly no case there is a reason why someone
would want to use a dentry for itself. This series reflects that fact in
nameidata where there is absolutly no reason at all.
400+ lines changed in this patch, some 10 in a
Junjiro Okajima,
first of all thanks for the feedback on my union mount patches.
On Tue, Nov 06, [EMAIL PROTECTED] wrote:
Whiteouts in your code can be a serious memory pressure, since they are
kept in dcache. I know the inode for whiteouts exists only one and it is
shared, but dentries for
44 matches
Mail list logo