From: Eric Sandeen <sandeen@sandeen.net>
To: Mark Tinguely <tinguely@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: reserve fields in inode for parent ptr and alloc policy
Date: Wed, 10 Apr 2013 13:56:11 -0500 [thread overview]
Message-ID: <5165B5CB.2070203@sandeen.net> (raw)
In-Reply-To: <20130410182438.268267840@sgi.com>
On 4/10/13 1:24 PM, Mark Tinguely wrote:
> Reserve fields in new inode layout for parent pointer and
> allocation policy.
> ----
> The inode will hold the parent information for the first
> link to a file. Information for the other links will be
> held in extended attribute entries.
>
> The "di_parino" is the inode of the parent directory. The
> directory information for this entry is located the parent
> directory with "di_paroff" offset.
>
> The di_parino/di_paroff concept code is running.
> ----
> The "di_allocpolicy" will be used to remember the allocation
> policy associated with this inode.
can you say more about this allocation policy?
-Eric
> Signed-off-by: Mark Tinguely <tinguely@sgi.com>
> ---
> fs/xfs/xfs_dinode.h | 3 +++
> fs/xfs/xfs_inode.c | 6 ++++++
> fs/xfs/xfs_inode.h | 3 +++
> 3 files changed, 12 insertions(+)
>
> Index: b/fs/xfs/xfs_dinode.h
> ===================================================================
> --- a/fs/xfs/xfs_dinode.h
> +++ b/fs/xfs/xfs_dinode.h
> @@ -76,6 +76,9 @@ typedef struct xfs_dinode {
> __be64 di_changecount; /* number of attribute changes */
> __be64 di_lsn; /* flush sequence */
> __be64 di_flags2; /* more random flags */
> + __be64 di_parino; /* parent inode */
> + __be32 di_paroff; /* offset into parent directory */
> + __be32 di_allocpolicy; /* allocation policy number */
> __u8 di_pad2[16]; /* more padding for future expansion */
>
> /* fields only written to during inode creation */
> Index: b/fs/xfs/xfs_inode.c
> ===================================================================
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -875,6 +875,9 @@ xfs_dinode_from_disk(
> to->di_flags2 = be64_to_cpu(from->di_flags2);
> to->di_ino = be64_to_cpu(from->di_ino);
> to->di_lsn = be64_to_cpu(from->di_lsn);
> + to->di_parino = be64_to_cpu(from->di_parino);
> + to->di_paroff = be32_to_cpu(from->di_paroff);
> + to->di_allocpolicy = be32_to_cpu(from->di_allocpolicy);
> memcpy(to->di_pad2, from->di_pad2, sizeof(to->di_pad2));
> uuid_copy(&to->di_uuid, &from->di_uuid);
> }
> @@ -922,6 +925,9 @@ xfs_dinode_to_disk(
> to->di_flags2 = cpu_to_be64(from->di_flags2);
> to->di_ino = cpu_to_be64(from->di_ino);
> to->di_lsn = cpu_to_be64(from->di_lsn);
> + to->di_parino = cpu_to_be64(from->di_parino);
> + to->di_paroff = cpu_to_be32(from->di_paroff);
> + to->di_allocpolicy = cpu_to_be32(from->di_allocpolicy);
> memcpy(to->di_pad2, from->di_pad2, sizeof(to->di_pad2));
> uuid_copy(&to->di_uuid, &from->di_uuid);
> }
> Index: b/fs/xfs/xfs_inode.h
> ===================================================================
> --- a/fs/xfs/xfs_inode.h
> +++ b/fs/xfs/xfs_inode.h
> @@ -159,6 +159,9 @@ typedef struct xfs_icdinode {
> __uint64_t di_changecount; /* number of attribute changes */
> xfs_lsn_t di_lsn; /* flush sequence */
> __uint64_t di_flags2; /* more random flags */
> + xfs_ino_t di_parino; /* parent inode */
> + __uint32_t di_paroff; /* offset into parent directory */
> + __uint32_t di_allocpolicy; /* allocation policy number */
> __uint8_t di_pad2[16]; /* more padding for future expansion */
>
> /* fields only written to during inode creation */
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-04-10 18:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 18:24 [PATCH] xfs: reserve fields in inode for parent ptr and alloc policy Mark Tinguely
2013-04-10 18:56 ` Eric Sandeen [this message]
2013-04-10 19:39 ` Rich Johnston
2013-04-10 20:31 ` Mark Tinguely
2013-04-10 20:40 ` Eric Sandeen
2013-04-11 3:28 ` Dave Chinner
2013-04-11 3:00 ` Dave Chinner
2013-04-11 13:54 ` Mark Tinguely
2013-04-12 0:24 ` Dave Chinner
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=5165B5CB.2070203@sandeen.net \
--to=sandeen@sandeen.net \
--cc=tinguely@sgi.com \
--cc=xfs@oss.sgi.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