From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Josef Jeff Sipek" <jsipek@cs.sunysb.edu>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
torvalds@osdl.org, akpm@osdl.org, hch@infradead.org,
viro@ftp.linux.org.uk
Subject: Re: [PATCH 19 of 23] Unionfs: Helper macros/inlines
Date: Fri, 13 Oct 2006 11:23:51 +0300 [thread overview]
Message-ID: <84144f020610130123u1f7b9d2cve36c0242a6bc037@mail.gmail.com> (raw)
In-Reply-To: <d7b005418bfc9911ed07.1160197658@thor.fsl.cs.sunysb.edu>
Hi Josef,
The names of some of these macros are somewhat unreadable.
On 10/7/06, Josef Jeff Sipek <jsipek@cs.sunysb.edu> wrote:
> +/* Inode to private data */
> +static inline struct unionfs_inode_info *itopd(const struct inode *inode)
> +{
> + return
> + &(container_of(inode, struct unionfs_inode_container, vfs_inode)->
> + info);
> +}
Rename to unionfs_inode?
> +#define itohi_ptr(ino) (itopd(ino)->uii_inode)
unionfs_hidden_inodes ?
> +#define ibstart(ino) (itopd(ino)->b_start)
unionfs_inode_branch_start ?
> +#define ibend(ino) (itopd(ino)->b_end)
unionfs_inode_branch_end ?
> +#define stopd(super) ((struct unionfs_sb_info *)(super)->s_fs_info)
unionfs_sb_info ?
> +#define stopd_lhs(super) ((super)->s_fs_info)
This you should drop.
> +#define sbstart(sb) 0
unionfs_sb_branch_start?
> +#define sbend(sb) stopd(sb)->b_end
unionfs_sb_branch_end?
> +#define sbmax(sb) (stopd(sb)->b_end + 1)
unionfs_sb_branch_max?
> +#define ftopd(file) ((struct unionfs_file_info *)((file)->private_data))
unionfs_file_info ?
> +#define ftopd_lhs(file) ((file)->private_data)
This you should drop.
> +#define ftohf_ptr(file) (ftopd(file)->ufi_file)
unionfs_hidden_files ?
> +#define fbstart(file) (ftopd(file)->b_start)
unionfs_file_branch_start ?
> +#define fbend(file) (ftopd(file)->b_end)
unionfs_file_branch_end ?
> +
> +/* File to hidden file. */
> +static inline struct file *ftohf(struct file *f)
> +{
> + return ftopd(f)->ufi_file[fbstart(f)];
> +}
unionfs_hidden_file ?
> +
> +static inline struct file *ftohf_index(const struct file *f, int index)
> +{
> + return ftopd(f)->ufi_file[index];
> +}
__unionfs_hidden_file (and make the above use this too)?
> +
> +static inline void set_ftohf_index(struct file *f, int index, struct file *val)
> +{
> + ftopd(f)->ufi_file[index] = val;
> +}
__unionfs_set_hidden_file ?
> +
> +static inline void set_ftohf(struct file *f, struct file *val)
> +{
> + ftopd(f)->ufi_file[fbstart(f)] = val;
> +}
unionfs_set_hidden_file ?
[Same comments apply for the rest.]
next prev parent reply other threads:[~2006-10-13 8:23 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-07 5:07 [PATCH 0 of 23] Unionfs: Stackable Namespace Unification Filesystem Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 1 of 23] Unionfs: Documentation Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 2 of 23] lookup_one_len_nd - lookup_one_len with nameidata argument Josef Jeff Sipek
2006-10-07 17:03 ` Daniel Walker
2006-10-07 18:23 ` Josef Sipek
2006-10-07 18:37 ` Daniel Walker
2006-10-07 5:07 ` [PATCH 3 of 23] Unionfs: Branch management functionality Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 4 of 23] Unionfs: Common file operations Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 5 of 23] Unionfs: Copyup Functionality Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 6 of 23] Unionfs: Dentry operations Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 7 of 23] Unionfs: File operations Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 8 of 23] Unionfs: Directory file operations Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 9 of 23] Unionfs: Directory manipulation helper functions Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 10 of 23] Unionfs: Inode operations Josef Jeff Sipek
2006-10-13 8:53 ` Pekka Enberg
2006-10-07 5:07 ` [PATCH 11 of 23] Unionfs: Lookup helper functions Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 12 of 23] Unionfs: Main module functions Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 13 of 23] Unionfs: Readdir state Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 14 of 23] Unionfs: Rename Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 15 of 23] Unionfs: Privileged operations workqueue Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 16 of 23] Unionfs: Handling of stale inodes Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 17 of 23] Unionfs: Miscellaneous helper functions Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 18 of 23] Unionfs: Superblock operations Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 19 of 23] Unionfs: Helper macros/inlines Josef Jeff Sipek
2006-10-13 8:23 ` Pekka Enberg [this message]
2006-10-07 5:07 ` [PATCH 20 of 23] Unionfs: Internal include file Josef Jeff Sipek
2006-10-13 8:02 ` Pekka Enberg
2006-10-13 8:05 ` Pekka Enberg
2006-10-07 5:07 ` [PATCH 21 of 23] Unionfs: Include file Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 22 of 23] Unionfs: Unlink Josef Jeff Sipek
2006-10-07 5:07 ` [PATCH 23 of 23] Unionfs: Kconfig and Makefile Josef Jeff Sipek
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=84144f020610130123u1f7b9d2cve36c0242a6bc037@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=jsipek@cs.sunysb.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=viro@ftp.linux.org.uk \
/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).