[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020610130123u1f7b9d2cve36c0242a6bc037@mail.gmail.com>
Date: Fri, 13 Oct 2006 11:23:51 +0300
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Josef Jeff Sipek" <jsipek@...sunysb.edu>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
torvalds@...l.org, akpm@...l.org, hch@...radead.org,
viro@....linux.org.uk
Subject: Re: [PATCH 19 of 23] Unionfs: Helper macros/inlines
Hi Josef,
The names of some of these macros are somewhat unreadable.
On 10/7/06, Josef Jeff Sipek <jsipek@...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.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists