X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flvfs%2Ffsfilt_snap_smfs.c;h=12e33ef57ac19c839695102e611adff58dc9f7b5;hb=2ef813a8244ea1527395e06645a2f3781cff16cd;hp=f59f55f965b5daa82763019789ed700a83b9f2dc;hpb=c79f7a9cdeeef1e421e47cc853482b247d8bd969;p=fs%2Flustre-release.git diff --git a/lustre/lvfs/fsfilt_snap_smfs.c b/lustre/lvfs/fsfilt_snap_smfs.c index f59f55f..12e33ef 100644 --- a/lustre/lvfs/fsfilt_snap_smfs.c +++ b/lustre/lvfs/fsfilt_snap_smfs.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -72,12 +72,13 @@ static struct inode* fsfilt_smfs_create_indirect(struct inode *inode, index, gen, cache_parent, del); post_smfs_inode(inode, cache_inode); post_smfs_inode(inode, cache_parent); - + #if 0 if (cache_ind_inode && !IS_ERR(cache_ind_inode)){ /*FIXME: get indirect inode set_cow flags*/ ind_inode = smfs_get_inode(inode->i_sb, cache_ind_inode->i_ino, inode, 0); - } + } + #endif RETURN(ind_inode); } @@ -103,12 +104,13 @@ static struct inode* fsfilt_smfs_get_indirect(struct inode *inode, cache_ind_inode = snap_fsfilt->fs_get_indirect(cache_inode, table, slot); post_smfs_inode(inode, cache_inode); - +#if 0 if (cache_ind_inode && !IS_ERR(cache_ind_inode)){ /*FIXME: get indirect inode set_cow flags*/ ind_inode = smfs_get_inode(inode->i_sb, cache_ind_inode->i_ino, inode, slot); } +#endif RETURN(ind_inode); } @@ -369,13 +371,13 @@ static int fsfilt_smfs_get_snap_info(struct inode *inode, void *key, static int fsfilt_smfs_read_dotsnap_dir_page(struct file *file, char *buf, size_t count, loff_t *off) { +#if 0 struct inode *inode = file->f_dentry->d_inode; struct fsfilt_operations *snap_cops = I2SNAPCOPS(inode); - struct snap_table *stbl = S2SNAPI(inode->i_sb)->sntbl; int i = 0, size = 0, off_count = 0, buf_off = 0, rc = 0; ENTRY; - /*Get the offset of dir ent*/ + //struct snap_table *stbl = S2SNAPI(inode->i_sb)->sni_table; while (size < *off && off_count < stbl->sntbl_count) { char *name = stbl->sntbl_items[i].sn_name; size +=snap_cops->fs_dir_ent_size(name); @@ -395,8 +397,10 @@ static int fsfilt_smfs_read_dotsnap_dir_page(struct file *file, char *buf, } if (rc > 0) rc = 0; - - RETURN(rc); +#else +#warning "still not implement read .snap dir page for fsfilt Wangdi" +#endif + RETURN(0); } struct fsfilt_operations fsfilt_smfs_snap_ops = {