X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Faufs%2Fcpup.h;h=40eef8c49e369708dba5303dd5913bd5462f1486;hp=2e4fbe079a25a4a6cacbad647c2f24e2e9dc09bd;hb=166e8d4a6cbbbdc72ba6a8f868a2d595ccb8c0ff;hpb=c432db279f4f03bf6a315bc2138ac3a15717e6bb diff --git a/fs/aufs/cpup.h b/fs/aufs/cpup.h index 2e4fbe079a25..40eef8c49e36 100644 --- a/fs/aufs/cpup.h +++ b/fs/aufs/cpup.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 Junjiro R. Okajima + * Copyright (C) 2005-2013 Junjiro R. Okajima * * This program, aufs is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,8 +29,9 @@ struct inode; struct file; +struct au_pin; -void au_cpup_attr_flags(struct inode *dst, struct inode *src); +void au_cpup_attr_flags(struct inode *dst, unsigned int iflags); void au_cpup_attr_timesizes(struct inode *inode); void au_cpup_attr_nlink(struct inode *inode, int force); void au_cpup_attr_changeable(struct inode *inode); @@ -39,10 +40,21 @@ void au_cpup_attr_all(struct inode *inode, int force); /* ---------------------------------------------------------------------- */ +struct au_cp_generic { + struct dentry *dentry; + aufs_bindex_t bdst, bsrc; + loff_t len; + struct au_pin *pin; + unsigned int flags; +}; + /* cpup flags */ #define AuCpup_DTIME 1 /* do dtime_store/revert */ #define AuCpup_KEEPLINO (1 << 1) /* do not clear the lower xino, for link(2) */ +#define AuCpup_RENAME (1 << 2) /* rename after cpup */ +#define AuCpup_HOPEN (1 << 3) /* call h_open_pre/post() in cpup */ + #define au_ftest_cpup(flags, name) ((flags) & AuCpup_##name) #define au_fset_cpup(flags, name) \ do { (flags) |= AuCpup_##name; } while (0) @@ -50,16 +62,12 @@ void au_cpup_attr_all(struct inode *inode, int force); do { (flags) &= ~AuCpup_##name; } while (0) int au_copy_file(struct file *dst, struct file *src, loff_t len); -int au_sio_cpup_single(struct dentry *dentry, aufs_bindex_t bdst, - aufs_bindex_t bsrc, loff_t len, unsigned int flags, - struct dentry *dst_parent); -int au_sio_cpup_simple(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, - unsigned int flags); -int au_sio_cpup_wh(struct dentry *dentry, aufs_bindex_t bdst, loff_t len, - struct file *file); +int au_sio_cpup_simple(struct au_cp_generic *cpg); +int au_sio_cpup_wh(struct au_cp_generic *cpg, struct file *file); int au_cp_dirs(struct dentry *dentry, aufs_bindex_t bdst, int (*cp)(struct dentry *dentry, aufs_bindex_t bdst, + struct au_pin *pin, struct dentry *h_parent, void *arg), void *arg); int au_cpup_dirs(struct dentry *dentry, aufs_bindex_t bdst);