X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_oi.h;h=e27841198db7f1590b266944c5a2d31db1fa228c;hb=e5116ab831c6b7c87594c52d9bdb5a786b35b956;hp=c9d727d211b91d892f8728f2e8f884b0ad3034ce;hpb=1f1d3a376d488d715dd1b0c94d5b66ea05c1e6ca;p=fs%2Flustre-release.git diff --git a/lustre/osd-ldiskfs/osd_oi.h b/lustre/osd-ldiskfs/osd_oi.h index c9d727d..e278411 100644 --- a/lustre/osd-ldiskfs/osd_oi.h +++ b/lustre/osd-ldiskfs/osd_oi.h @@ -83,10 +83,12 @@ struct osd_inode_id { __u32 oii_gen; /* inode generation */ }; +/* OI cache entry */ struct osd_idmap_cache { struct lu_fid oic_fid; struct osd_inode_id oic_lid; struct osd_device *oic_dev; + __u16 oic_remote:1; /* FID isn't local */ }; static inline void osd_id_pack(struct osd_inode_id *tgt, @@ -137,14 +139,15 @@ enum oi_check_flags { }; int osd_oi_mod_init(void); -int osd_oi_init(struct osd_thread_info *info, struct osd_device *osd); +int osd_oi_init(struct osd_thread_info *info, struct osd_device *osd, + bool restored); void osd_oi_fini(struct osd_thread_info *info, struct osd_device *osd); int osd_oi_lookup(struct osd_thread_info *info, struct osd_device *osd, const struct lu_fid *fid, struct osd_inode_id *id, enum oi_check_flags flags); int osd_oi_insert(struct osd_thread_info *info, struct osd_device *osd, const struct lu_fid *fid, const struct osd_inode_id *id, - handle_t *th, enum oi_check_flags flags); + handle_t *th, enum oi_check_flags flags, bool *exist); int osd_oi_delete(struct osd_thread_info *info, struct osd_device *osd, const struct lu_fid *fid, handle_t *th, enum oi_check_flags flags);