Whamcloud - gitweb
LU-2684 fid: unify ostid and FID
authorwangdi <di.wang@whamcloud.com>
Fri, 17 Jan 2014 08:30:12 +0000 (00:30 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Apr 2013 06:15:26 +0000 (02:15 -0400)
commit6794d7654b4c459519a9e6d85ed439c8c594c2e7
tree616ff308f071bd0b135d391b88eadb34047d82fc
parent43f5fe89a53ffe8da2e1ff93f63d55851490d930
LU-2684 fid: unify ostid and FID

Since 2.4 will support FID on OST, so this patch will try to unify
ostid and FID, so one day, we will use FID to identify the object
everywhere.

Because both ostid and FID has 128 bits long, so we will re-define
ostid as union,

struct ost_id {
    union {
    struct ostid {
    __u64   oi_id;
    __u64   oi_seq;
    } oi;
    struct lu_fid oi_fid;
    };
};

If oi_seq == 0, it will still use <oi_seq, oi_id> to locate the
object as before. And when building reside, it still keeps the
old way res[0] = obj_id, res[1] = obj_seq;

If oi_seq != 0, it will use FID(oi_fid) directly to locate the
object, and use FID to build resid directly, so it will be unified
with META lock resid.

Remove other direct _id and _seq accessment from the code.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b1_8 clientbuildno=258 testlist=runtests
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b2_1 clientbuildno=191 testlist=runtests
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b2_3 clientbuildno=41 testlist=runtests
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I800a2b569169fcab4c886f3a17fc4e157ff78038
Reviewed-on: http://review.whamcloud.com/5820
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
59 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre_fid.h
lustre/include/lustre_log.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/liblustre/super.c
lustre/liblustre/tests/sanity.c
lustre/llite/file.c
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lov/lov_log.c
lustre/lov/lov_merge.c
lustre/lov/lov_obd.c
lustre/lov/lov_object.c
lustre/lov/lov_pack.c
lustre/lov/lov_request.c
lustre/mdd/mdd_device.c
lustre/obdclass/linux/linux-obdo.c
lustre/obdclass/llog.c
lustre/obdclass/llog_cat.c
lustre/obdclass/llog_internal.h
lustre/obdclass/llog_ioctl.c
lustre/obdclass/llog_lvfs.c
lustre/obdclass/llog_osd.c
lustre/obdclass/llog_swab.c
lustre/obdclass/llog_test.c
lustre/obdclass/obdo.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/ofd/lproc_ofd.c
lustre/ofd/ofd_fs.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_io.c
lustre/ofd/ofd_lvb.c
lustre/ofd/ofd_obd.c
lustre/ofd/ofd_objects.c
lustre/osc/osc_io.c
lustre/osc/osc_object.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-zfs/osd_oi.c
lustre/osp/osp_internal.h
lustre/osp/osp_object.c
lustre/osp/osp_precreate.c
lustre/osp/osp_sync.c
lustre/ost/ost_handler.c
lustre/ost/ost_internal.h
lustre/ptlrpc/layout.c
lustre/ptlrpc/llog_server.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c
lustre/utils/loadgen.c
lustre/utils/obd.c
lustre/utils/obdiolib.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c