From cf209f82cb6430f4ff56d33bf99fedccd476604b Mon Sep 17 00:00:00 2001 From: Yiannis Pericleous Date: Tue, 22 May 2007 16:14:45 -0400 Subject: [PATCH] added odf/sr to odf structure, that will contain odf silly renamed files --- fs/unionfs/odf.c | 15 +++++++++++++++ fs/unionfs/odf.h | 1 + fs/unionfs/union.h | 1 + 3 files changed, 17 insertions(+) diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c index 82e1be54d6..04c4172f0d 100644 --- a/fs/unionfs/odf.c +++ b/fs/unionfs/odf.c @@ -54,6 +54,13 @@ int __odf_create_hierarchy(struct dentry *odf_root) goto out; } dput(dentry); + dentry = __odf_create_dir(odf_root, ODF_SR); + if (IS_ERR(dentry)){ + err = PTR_ERR(dentry); + dentry = NULL; + goto out; + } + dput(dentry); dentry = lookup_one_len(ODF_WH_NAME, odf_root, ODF_WH_LEN); if (IS_ERR(dentry)) { err = PTR_ERR(dentry); @@ -150,6 +157,13 @@ struct odf_sb_info* odf_read_super(char *options) goto out_free; } + osi->odi_sr = odf_getpath(nd.dentry, osi, ODF_SR); + if (IS_ERR(osi->odi_sr)){ + err = PTR_ERR(osi->odi_sr); + osi->odi_sr = NULL; + goto out_free; + } + osi->whiteout = lookup_one_len(ODF_WH_NAME, nd.dentry, ODF_WH_LEN); if (IS_ERR(osi->whiteout)) { err = PTR_ERR(osi->whiteout); @@ -203,6 +217,7 @@ void odf_put_super(struct odf_sb_info *osi) /* do not put ns here, as it will be put by root of UnionFs*/ odf_put_info(osi->odi_rc); odf_put_info(osi->odi_ic); + odf_put_info(osi->odi_sr); dput(osi->mnt->mnt_sb->s_root); dput(osi->sb); dput(osi->whiteout); diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h index b9a558a6c6..8f408c3e6e 100644 --- a/fs/unionfs/odf.h +++ b/fs/unionfs/odf.h @@ -9,6 +9,7 @@ #define ODF_IC "ic" #define ODF_RC "reclaim" #define ODF_NS "ns" +#define ODF_SR "sr" /* Some string constants */ #define ODF_BRANCH_PATH 255 diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h index c082bd4b38..258d69e614 100644 --- a/fs/unionfs/union.h +++ b/fs/unionfs/union.h @@ -112,6 +112,7 @@ struct odf_sb_info { struct odf_dentry_info *odi_ns; /* namespace (/ns) */ struct odf_dentry_info *odi_rc; /* reclaim (/reclaim) */ struct odf_dentry_info *odi_ic; /* inode cache (/ic) */ + struct odf_dentry_info *odi_sr; /* silly renamed files (/sr) */ struct sioa_args *cleanup; /* our cleanup thread */ char *branch_uuids; /* not null terminated string of all branch uuids*/ int opaque_branch_id; /* should always be the branch id of branch 0*/ -- 2.43.0