Whamcloud - gitweb
LU-6201 llite: remove duplicate fiemap defines 08/13608/8
authorBobi Jam <bobijam.xu@intel.com>
Mon, 18 May 2015 15:36:33 +0000 (11:36 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 28 May 2015 20:31:28 +0000 (20:31 +0000)
* replace struct ll_user_fiemap with struct fiemap
* replace struct ll_fiemap_extent with struct fiemap_extent
* remove kernel defined FIEMAP_EXTENT_* constants
* remove kernel defined FIEMAP_FLAG_* flags
* add member prefix for struct ll_fiemap_info_key

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ib43276fa0c62242d82649c23afce9f7ec707a74a
Reviewed-on: http://review.whamcloud.com/13608
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
16 files changed:
lustre/include/dt_object.h
lustre/include/lustre/ll_fiemap.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/llite/file.c
lustre/lov/lov_object.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_obd.c
lustre/osc/osc_object.c
lustre/osd-ldiskfs/osd_io.c
lustre/ptlrpc/nrs_orr.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index c192728..e5f782c 100644 (file)
@@ -1265,7 +1265,7 @@ struct dt_body_operations {
         */
        int (*dbo_fiemap_get)(const struct lu_env *env,
                              struct dt_object *dt,
-                             struct ll_user_fiemap *fm);
+                             struct fiemap *fm);
 
        /**
         * Declare intention to deallocate space from an object.
@@ -2374,7 +2374,7 @@ static inline int dt_punch(const struct lu_env *env, struct dt_object *dt,
 }
 
 static inline int dt_fiemap_get(const struct lu_env *env, struct dt_object *d,
-                                struct ll_user_fiemap *fm)
+                               struct fiemap *fm)
 {
         LASSERT(d);
         if (d->do_body_ops == NULL)
index 221fb7b..8dbe673 100644 (file)
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
-#if !defined(__KERNEL__)
-
+#ifndef __KERNEL__
 #include <stddef.h>
-#include <libcfs/types.h>
-
-struct ll_fiemap_extent {
-        __u64 fe_logical;  /* logical offset in bytes for the start of
-                            * the extent from the beginning of the file */
-        __u64 fe_physical; /* physical offset in bytes for the start
-                            * of the extent from the beginning of the disk */
-        __u64 fe_length;   /* length in bytes for this extent */
-        __u64 fe_reserved64[2];
-        __u32 fe_flags;    /* FIEMAP_EXTENT_* flags for this extent */
-        __u32 fe_device;   /* device number for this extent */
-        __u32 fe_reserved[2];
-};
-
-struct ll_user_fiemap {
-        __u64 fm_start;  /* logical offset (inclusive) at
-                          * which to start mapping (in) */
-        __u64 fm_length; /* logical length of mapping which
-                          * userspace wants (in) */
-        __u32 fm_flags;  /* FIEMAP_FLAG_* flags for request (in/out) */
-        __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
-        __u32 fm_extent_count;  /* size of fm_extents array (in) */
-        __u32 fm_reserved;
-        struct ll_fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
-};
-
-#define FIEMAP_MAX_OFFSET      (~0ULL)
-
-#define FIEMAP_FLAG_SYNC         0x00000001 /* sync file data before map */
-#define FIEMAP_FLAG_XATTR        0x00000002 /* map extended attribute tree */
-
-#define FIEMAP_EXTENT_LAST              0x00000001 /* Last extent in file. */
-#define FIEMAP_EXTENT_UNKNOWN           0x00000002 /* Data location unknown. */
-#define FIEMAP_EXTENT_DELALLOC          0x00000004 /* Location still pending.
-                                                    * Sets EXTENT_UNKNOWN. */
-#define FIEMAP_EXTENT_ENCODED           0x00000008 /* Data can not be read
-                                                    * while fs is unmounted */
-#define FIEMAP_EXTENT_DATA_ENCRYPTED    0x00000080 /* Data is encrypted by fs.
-                                                    * Sets EXTENT_NO_DIRECT. */
-#define FIEMAP_EXTENT_NOT_ALIGNED       0x00000100 /* Extent offsets may not be
-                                                    * block aligned. */
-#define FIEMAP_EXTENT_DATA_INLINE       0x00000200 /* Data mixed with metadata.
-                                                    * Sets EXTENT_NOT_ALIGNED.*/
-#define FIEMAP_EXTENT_DATA_TAIL         0x00000400 /* Multiple files in block.
-                                                    * Sets EXTENT_NOT_ALIGNED.*/
-#define FIEMAP_EXTENT_UNWRITTEN         0x00000800 /* Space allocated, but
-                                                    * no data (i.e. zero). */
-#define FIEMAP_EXTENT_MERGED            0x00001000 /* File does not natively
-                                                    * support extents. Result
-                                                    * merged for efficiency. */
-#else
-
-#define ll_fiemap_extent fiemap_extent
-#define ll_user_fiemap   fiemap
-#define fe_device        fe_reserved[0]
+#include <linux/fiemap.h>
+#endif
 
-#endif /* HAVE_LINUX_FIEMAP_H */
+/* XXX: We use fiemap_extent::fe_reserved[0] */
+#define fe_device      fe_reserved[0]
 
 static inline size_t fiemap_count_to_size(size_t extent_count)
 {
-        return (sizeof(struct ll_user_fiemap) + extent_count *
-                                               sizeof(struct ll_fiemap_extent));
+       return sizeof(struct fiemap) + extent_count *
+                                      sizeof(struct fiemap_extent);
 }
 
 static inline unsigned fiemap_size_to_count(size_t array_size)
 {
-        return ((array_size - sizeof(struct ll_user_fiemap)) /
-                                               sizeof(struct ll_fiemap_extent));
+       return (array_size - sizeof(struct fiemap)) /
+              sizeof(struct fiemap_extent);
 }
 
 #define FIEMAP_FLAG_DEVICE_ORDER 0x40000000 /* return device ordered mapping */
@@ -125,8 +72,8 @@ static inline unsigned fiemap_size_to_count(size_t array_size)
 #endif
 
 /* Lustre specific flags - use a high bit, don't conflict with upstream flag */
-#define FIEMAP_EXTENT_NO_DIRECT         0x40000000 /* Data mapping undefined */
-#define FIEMAP_EXTENT_NET               0x80000000 /* Data stored remotely.
-                                                    * Sets NO_DIRECT flag */
+#define FIEMAP_EXTENT_NO_DIRECT 0x40000000 /* Data mapping undefined */
+#define FIEMAP_EXTENT_NET       0x80000000 /* Data stored remotely.
+                                           * Sets NO_DIRECT flag */
 
 #endif /* _LUSTRE_FIEMAP_H */
index 1ff8623..314dbd7 100644 (file)
@@ -3609,14 +3609,14 @@ struct ost_body {
 
 /* Key for FIEMAP to be used in get_info calls */
 struct ll_fiemap_info_key {
-        char    name[8];
-        struct  obdo oa;
-        struct  ll_user_fiemap fiemap;
+       char            lfik_name[8];
+       struct obdo     lfik_oa;
+       struct fiemap   lfik_fiemap;
 };
 
 extern void lustre_swab_ost_body (struct ost_body *b);
 extern void lustre_swab_ost_last_id(__u64 *id);
-extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
+extern void lustre_swab_fiemap(struct fiemap *fiemap);
 
 extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
 extern void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum);
index 65af676..7f746e1 100644 (file)
@@ -88,7 +88,6 @@ typedef struct stat64 lstat_t;
 #define FSFILT_IOC_SETVERSION             _IOW('f', 4, long)
 #define FSFILT_IOC_GETVERSION_OLD         _IOR('v', 1, long)
 #define FSFILT_IOC_SETVERSION_OLD         _IOW('v', 2, long)
-#define FSFILT_IOC_FIEMAP                 _IOWR('f', 11, struct ll_user_fiemap)
 #endif
 
 /* FIEMAP flags supported by Lustre */
index 5138b84..fbc255c 100644 (file)
@@ -1738,7 +1738,7 @@ static int ll_do_fiemap(struct inode *inode, struct fiemap *fiemap,
        struct lu_env                   *env;
        int                             refcheck;
        int                             rc = 0;
-       struct ll_fiemap_info_key       fmkey = { .name = KEY_FIEMAP, };
+       struct ll_fiemap_info_key       fmkey = { .lfik_name = KEY_FIEMAP, };
        ENTRY;
 
        /* Checks for fiemap flags */
@@ -1764,17 +1764,17 @@ static int ll_do_fiemap(struct inode *inode, struct fiemap *fiemap,
                        GOTO(out, rc);
        }
 
-       fmkey.oa.o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
-       obdo_from_inode(&fmkey.oa, inode, OBD_MD_FLSIZE);
-       obdo_set_parent_fid(&fmkey.oa, &ll_i2info(inode)->lli_fid);
+       fmkey.lfik_oa.o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
+       obdo_from_inode(&fmkey.lfik_oa, inode, OBD_MD_FLSIZE);
+       obdo_set_parent_fid(&fmkey.lfik_oa, &ll_i2info(inode)->lli_fid);
 
        /* If filesize is 0, then there would be no objects for mapping */
-       if (fmkey.oa.o_size == 0) {
+       if (fmkey.lfik_oa.o_size == 0) {
                fiemap->fm_mapped_extents = 0;
                GOTO(out, rc = 0);
        }
 
-       fmkey.fiemap = *fiemap;
+       fmkey.lfik_fiemap = *fiemap;
 
        rc = cl_object_fiemap(env, ll_i2info(inode)->lli_clob,
                              &fmkey, fiemap, &num_bytes);
@@ -1826,61 +1826,6 @@ gf_free:
        RETURN(rc);
 }
 
-static int ll_ioctl_fiemap(struct inode *inode, struct fiemap __user *arg)
-{
-       struct fiemap   *fiemap;
-       size_t          num_bytes;
-       size_t          ret_bytes;
-       __u32           extent_count;
-       int             rc = 0;
-
-       /* Get the extent count so we can calculate the size of
-        * required fiemap buffer */
-       if (get_user(extent_count, &arg->fm_extent_count))
-               RETURN(-EFAULT);
-
-       if (extent_count >=
-           (SIZE_MAX - sizeof(*fiemap)) / sizeof(struct ll_fiemap_extent))
-               RETURN(-EINVAL);
-       num_bytes = sizeof(*fiemap) + (extent_count *
-                                      sizeof(struct ll_fiemap_extent));
-
-       OBD_ALLOC_LARGE(fiemap, num_bytes);
-       if (fiemap == NULL)
-               RETURN(-ENOMEM);
-
-       /* get the fiemap value */
-       if (copy_from_user(fiemap, arg, sizeof(*fiemap)))
-               GOTO(error, rc = -EFAULT);
-
-       /* If fm_extent_count is non-zero, read the first extent since
-        * it is used to calculate end_offset and device from previous
-        * fiemap call. */
-       if (extent_count != 0) {
-               if (copy_from_user(&fiemap->fm_extents[0],
-                                  (char __user *)arg + sizeof(*fiemap),
-                                  sizeof(struct ll_fiemap_extent)))
-                       GOTO(error, rc = -EFAULT);
-       }
-
-       rc = ll_do_fiemap(inode, fiemap, num_bytes);
-       if (rc)
-               GOTO(error, rc);
-
-       ret_bytes = sizeof(struct fiemap);
-
-       if (extent_count != 0)
-               ret_bytes += (fiemap->fm_mapped_extents *
-                                sizeof(struct ll_fiemap_extent));
-
-       if (copy_to_user((void __user *)arg, fiemap, ret_bytes))
-               rc = -EFAULT;
-
-error:
-       OBD_FREE_LARGE(fiemap, num_bytes);
-       RETURN(rc);
-}
-
 /*
  * Read the data_version for inode.
  *
@@ -2291,8 +2236,6 @@ out:
        case LL_IOC_LOV_GETSTRIPE:
                RETURN(ll_file_getstripe(inode,
                                         (struct lov_user_md __user *)arg));
-       case FSFILT_IOC_FIEMAP:
-               RETURN(ll_ioctl_fiemap(inode, (struct fiemap __user *)arg));
         case FSFILT_IOC_GETFLAGS:
         case FSFILT_IOC_SETFLAGS:
                 RETURN(ll_iocontrol(inode, file, cmd, arg));
@@ -3329,35 +3272,37 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
 static int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
                     __u64 start, __u64 len)
 {
-        int rc;
-        size_t num_bytes;
-        struct ll_user_fiemap *fiemap;
-        unsigned int extent_count = fieinfo->fi_extents_max;
+       int             rc;
+       size_t          num_bytes;
+       struct fiemap   *fiemap;
+       unsigned int    extent_count = fieinfo->fi_extents_max;
 
-        num_bytes = sizeof(*fiemap) + (extent_count *
-                                       sizeof(struct ll_fiemap_extent));
-        OBD_ALLOC_LARGE(fiemap, num_bytes);
+       num_bytes = sizeof(*fiemap) + (extent_count *
+                                      sizeof(struct fiemap_extent));
+       OBD_ALLOC_LARGE(fiemap, num_bytes);
 
-        if (fiemap == NULL)
-                RETURN(-ENOMEM);
+       if (fiemap == NULL)
+               RETURN(-ENOMEM);
 
-        fiemap->fm_flags = fieinfo->fi_flags;
-        fiemap->fm_extent_count = fieinfo->fi_extents_max;
-        fiemap->fm_start = start;
-        fiemap->fm_length = len;
-       if (extent_count > 0)
-               memcpy(&fiemap->fm_extents[0], fieinfo->fi_extents_start,
-                      sizeof(struct ll_fiemap_extent));
+       fiemap->fm_flags = fieinfo->fi_flags;
+       fiemap->fm_extent_count = fieinfo->fi_extents_max;
+       fiemap->fm_start = start;
+       fiemap->fm_length = len;
+       if (extent_count > 0 &&
+           copy_from_user(&fiemap->fm_extents[0], fieinfo->fi_extents_start,
+                          sizeof(struct fiemap_extent)) != 0)
+               GOTO(out, rc = -EFAULT);
 
        rc = ll_do_fiemap(inode, fiemap, num_bytes);
 
        fieinfo->fi_flags = fiemap->fm_flags;
        fieinfo->fi_extents_mapped = fiemap->fm_mapped_extents;
-       if (extent_count > 0)
-               memcpy(fieinfo->fi_extents_start, &fiemap->fm_extents[0],
-                      fiemap->fm_mapped_extents *
-                      sizeof(struct ll_fiemap_extent));
-
+       if (extent_count > 0 &&
+           copy_to_user(fieinfo->fi_extents_start, &fiemap->fm_extents[0],
+                        fiemap->fm_mapped_extents *
+                        sizeof(struct fiemap_extent)) != 0)
+               GOTO(out, rc = -EFAULT);
+out:
        OBD_FREE_LARGE(fiemap, num_bytes);
        return rc;
 }
index 6836529..c51227b 100644 (file)
@@ -1043,7 +1043,7 @@ static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm,
  * \param current_extent [in]  where to start copying in the extent array
  */
 static void fiemap_prepare_and_copy_exts(struct fiemap *fiemap,
-                                        struct ll_fiemap_extent *lcl_fm_ext,
+                                        struct fiemap_extent *lcl_fm_ext,
                                         int ost_index, unsigned int ext_count,
                                         int current_extent)
 {
@@ -1057,7 +1057,7 @@ static void fiemap_prepare_and_copy_exts(struct fiemap *fiemap,
 
        /* Copy fm_extent's from fm_local to return buffer */
        to = (char *)fiemap + fiemap_count_to_size(current_extent);
-       memcpy(to, lcl_fm_ext, ext_count * sizeof(struct ll_fiemap_extent));
+       memcpy(to, lcl_fm_ext, ext_count * sizeof(struct fiemap_extent));
 }
 
 #define FIEMAP_BUFFER_SIZE 4096
@@ -1150,7 +1150,7 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
        struct cl_object        *subobj = NULL;
        struct lov_obd          *lov = lu2lov_dev(obj->co_lu.lo_dev)->ld_lov;
        struct fiemap           *fm_local = NULL;
-       struct ll_fiemap_extent *lcl_fm_ext;
+       struct fiemap_extent    *lcl_fm_ext;
        loff_t                  fm_start;
        loff_t                  fm_end;
        loff_t                  fm_length;
@@ -1186,7 +1186,7 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
                GOTO(out, rc = -ENOTSUPP);
 
        if (lsm_is_released(lsm)) {
-               if (fiemap->fm_start < fmkey->oa.o_size) {
+               if (fiemap->fm_start < fmkey->lfik_oa.o_size) {
                        /**
                         * released file, return a minimal FIEMAP if
                         * request fits in file-size.
@@ -1194,12 +1194,13 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
                        fiemap->fm_mapped_extents = 1;
                        fiemap->fm_extents[0].fe_logical = fiemap->fm_start;
                        if (fiemap->fm_start + fiemap->fm_length <
-                           fmkey->oa.o_size)
+                           fmkey->lfik_oa.o_size)
                                fiemap->fm_extents[0].fe_length =
                                        fiemap->fm_length;
                        else
                                fiemap->fm_extents[0].fe_length =
-                                       fmkey->oa.o_size - fiemap->fm_start;
+                                       fmkey->lfik_oa.o_size -
+                                       fiemap->fm_start;
                        fiemap->fm_extents[0].fe_flags |=
                                FIEMAP_EXTENT_UNKNOWN | FIEMAP_EXTENT_LAST;
                }
@@ -1219,11 +1220,11 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
        fm_length = fiemap->fm_length;
        /* Calculate start stripe, last stripe and length of mapping */
        start_stripe = lov_stripe_number(lsm, fm_start);
-       fm_end = (fm_length == ~0ULL) ? fmkey->oa.o_size :
+       fm_end = (fm_length == ~0ULL) ? fmkey->lfik_oa.o_size :
                                        fm_start + fm_length - 1;
        /* If fm_length != ~0ULL but fm_start_fm_length-1 exceeds file size */
-       if (fm_end > fmkey->oa.o_size)
-               fm_end = fmkey->oa.o_size;
+       if (fm_end > fmkey->lfik_oa.o_size)
+               fm_end = fmkey->lfik_oa.o_size;
 
        last_stripe = fiemap_calc_last_stripe(lsm, fm_start, fm_end,
                                              start_stripe, &stripe_count);
@@ -1332,7 +1333,8 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,
 
                        fm_local->fm_start = lun_start;
                        fm_local->fm_flags &= ~FIEMAP_FLAG_DEVICE_ORDER;
-                       memcpy(&fmkey->fiemap, fm_local, sizeof(*fm_local));
+                       memcpy(&fmkey->lfik_fiemap, fm_local,
+                              sizeof(*fm_local));
                        *buflen = fiemap_count_to_size(
                                                fm_local->fm_extent_count);
 
@@ -1383,7 +1385,7 @@ inactive_tgt:
                        if (lov_stripe_size(lsm,
                                        lcl_fm_ext[ext_count - 1].fe_logical +
                                        lcl_fm_ext[ext_count - 1].fe_length,
-                                       cur_stripe) >= fmkey->oa.o_size)
+                                       cur_stripe) >= fmkey->lfik_oa.o_size)
                                ost_eof = true;
 
                        fiemap_prepare_and_copy_exts(fiemap, lcl_fm_ext,
index a210a78..012cca3 100644 (file)
@@ -969,7 +969,7 @@ static int ofd_set_info_hdl(struct tgt_session_info *tsi)
  * \retval             negative value on error
  */
 int ofd_fiemap_get(const struct lu_env *env, struct ofd_device *ofd,
-                  struct lu_fid *fid, struct ll_user_fiemap *fiemap)
+                  struct lu_fid *fid, struct fiemap *fiemap)
 {
        struct ofd_object       *fo;
        int                      rc;
@@ -1057,13 +1057,13 @@ static int lock_region(struct ldlm_namespace *ns, struct ldlm_res_id *res_id,
  */
 static int lock_zero_regions(struct ldlm_namespace *ns,
                             struct ldlm_res_id *res_id,
-                            struct ll_user_fiemap *fiemap,
+                            struct fiemap *fiemap,
                             struct list_head *locked)
 {
        __u64 begin = fiemap->fm_start;
        unsigned int i;
        int rc = 0;
-       struct ll_fiemap_extent *fiemap_start = fiemap->fm_extents;
+       struct fiemap_extent *fiemap_start = fiemap->fm_extents;
 
        ENTRY;
 
@@ -1171,21 +1171,22 @@ static int ofd_get_info_hdl(struct tgt_session_info *tsi)
                ofd_seq_put(tsi->tsi_env, oseq);
        } else if (KEY_IS(KEY_FIEMAP)) {
                struct ll_fiemap_info_key       *fm_key;
-               struct ll_user_fiemap           *fiemap;
+               struct fiemap                   *fiemap;
                struct lu_fid                   *fid;
 
                req_capsule_extend(tsi->tsi_pill, &RQF_OST_GET_INFO_FIEMAP);
 
                fm_key = req_capsule_client_get(tsi->tsi_pill, &RMF_FIEMAP_KEY);
-               rc = tgt_validate_obdo(tsi, &fm_key->oa);
+               rc = tgt_validate_obdo(tsi, &fm_key->lfik_oa);
                if (rc)
                        RETURN(err_serious(rc));
 
-               fid = &fm_key->oa.o_oi.oi_fid;
+               fid = &fm_key->lfik_oa.o_oi.oi_fid;
 
                CDEBUG(D_INODE, "get FIEMAP of object "DFID"\n", PFID(fid));
 
-               replylen = fiemap_count_to_size(fm_key->fiemap.fm_extent_count);
+               replylen = fiemap_count_to_size(
+                                       fm_key->lfik_fiemap.fm_extent_count);
                req_capsule_set_size(tsi->tsi_pill, &RMF_FIEMAP_VAL,
                                     RCL_SERVER, replylen);
 
@@ -1197,13 +1198,13 @@ static int ofd_get_info_hdl(struct tgt_session_info *tsi)
                if (fiemap == NULL)
                        RETURN(-ENOMEM);
 
-               *fiemap = fm_key->fiemap;
+               *fiemap = fm_key->lfik_fiemap;
                rc = ofd_fiemap_get(tsi->tsi_env, ofd, fid, fiemap);
 
                /* LU-3219: Lock the sparse areas to make sure dirty
                 * flushed back from client, then call fiemap again. */
-               if (fm_key->oa.o_valid & OBD_MD_FLFLAGS &&
-                   fm_key->oa.o_flags & OBD_FL_SRVLOCK) {
+               if (fm_key->lfik_oa.o_valid & OBD_MD_FLFLAGS &&
+                   fm_key->lfik_oa.o_flags & OBD_FL_SRVLOCK) {
                        struct list_head locked;
 
                        INIT_LIST_HEAD(&locked);
index 0684506..a5c681b 100644 (file)
@@ -329,7 +329,7 @@ extern void target_recovery_init(struct lu_target *lut, svc_handler_t handler);
 extern struct lu_context_key ofd_thread_key;
 int ofd_postrecov(const struct lu_env *env, struct ofd_device *ofd);
 int ofd_fiemap_get(const struct lu_env *env, struct ofd_device *ofd,
-                  struct lu_fid *fid, struct ll_user_fiemap *fiemap);
+                  struct lu_fid *fid, struct fiemap *fiemap);
 
 /* ofd_obd.c */
 extern struct obd_ops ofd_obd_ops;
index 6de500c..ff047ca 100644 (file)
@@ -638,7 +638,7 @@ static int ofd_get_info(const struct lu_env *env, struct obd_export *exp,
        struct ofd_thread_info          *info;
        struct ofd_device               *ofd;
        struct ll_fiemap_info_key       *fm_key = key;
-       struct ll_user_fiemap           *fiemap = val;
+       struct fiemap                   *fiemap = val;
        int                              rc = 0;
 
        ENTRY;
@@ -653,7 +653,7 @@ static int ofd_get_info(const struct lu_env *env, struct obd_export *exp,
        if (KEY_IS(KEY_FIEMAP)) {
                info = ofd_info_init(env, exp);
 
-               rc = ostid_to_fid(&info->fti_fid, &fm_key->oa.o_oi,
+               rc = ostid_to_fid(&info->fti_fid, &fm_key->lfik_oa.o_oi,
                                  ofd->ofd_lut.lut_lsd.lsd_osd_index);
                if (rc != 0)
                        RETURN(rc);
index 0477dcd..2b9b50a 100644 (file)
@@ -271,21 +271,21 @@ static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,
        int                             rc;
        ENTRY;
 
-       fmkey->oa.o_oi = cl2osc(obj)->oo_oinfo->loi_oi;
-       if (!(fmkey->fiemap.fm_flags & FIEMAP_FLAG_SYNC))
+       fmkey->lfik_oa.o_oi = cl2osc(obj)->oo_oinfo->loi_oi;
+       if (!(fmkey->lfik_fiemap.fm_flags & FIEMAP_FLAG_SYNC))
                goto skip_locking;
 
-       policy.l_extent.start = fmkey->fiemap.fm_start & PAGE_CACHE_MASK;
+       policy.l_extent.start = fmkey->lfik_fiemap.fm_start & PAGE_CACHE_MASK;
 
-       if (OBD_OBJECT_EOF - fmkey->fiemap.fm_length <=
-           fmkey->fiemap.fm_start + PAGE_CACHE_SIZE - 1)
+       if (OBD_OBJECT_EOF - fmkey->lfik_fiemap.fm_length <=
+           fmkey->lfik_fiemap.fm_start + PAGE_CACHE_SIZE - 1)
                policy.l_extent.end = OBD_OBJECT_EOF;
        else
-               policy.l_extent.end = (fmkey->fiemap.fm_start +
-                                      fmkey->fiemap.fm_length +
+               policy.l_extent.end = (fmkey->lfik_fiemap.fm_start +
+                                      fmkey->lfik_fiemap.fm_length +
                                       PAGE_CACHE_SIZE - 1) & PAGE_CACHE_MASK;
 
-       ostid_build_res_name(&fmkey->oa.o_oi, &resid);
+       ostid_build_res_name(&fmkey->lfik_oa.o_oi, &resid);
        mode = ldlm_lock_match(exp->exp_obd->obd_namespace,
                               LDLM_FL_BLOCK_GRANTED | LDLM_FL_LVB_READY,
                               &resid, LDLM_EXTENT, &policy,
@@ -296,8 +296,8 @@ static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,
                        ldlm_lock_decref(&lockh, LCK_PW);
                }
        } else { /* no cached lock, needs acquire lock on server side */
-               fmkey->oa.o_valid |= OBD_MD_FLFLAGS;
-               fmkey->oa.o_flags |= OBD_FL_SRVLOCK;
+               fmkey->lfik_oa.o_valid |= OBD_MD_FLFLAGS;
+               fmkey->lfik_oa.o_flags |= OBD_FL_SRVLOCK;
        }
 
 skip_locking:
index a0fb969..8c32812 100644 (file)
@@ -1847,7 +1847,7 @@ static int fiemap_check_ranges(struct inode *inode,
 #define FIEMAP_MAX_EXTENTS     (UINT_MAX / sizeof(struct fiemap_extent))
 
 static int osd_fiemap_get(const struct lu_env *env, struct dt_object *dt,
-                          struct ll_user_fiemap *fm)
+                         struct fiemap *fm)
 {
        struct fiemap_extent_info fieinfo = {0, };
        struct inode *inode = osd_dt_obj(dt)->oo_inode;
index 74578c5..0973b69 100644 (file)
@@ -232,18 +232,18 @@ static int nrs_orr_range_fill_physical(struct ptlrpc_nrs_request *nrq,
        struct ptlrpc_request     *req = container_of(nrq,
                                                      struct ptlrpc_request,
                                                      rq_nrq);
-       char                       fiemap_buf[offsetof(struct ll_user_fiemap,
+       char                       fiemap_buf[offsetof(struct fiemap,
                                                  fm_extents[ORR_NUM_EXTENTS])];
-       struct ll_user_fiemap     *fiemap = (struct ll_user_fiemap *)fiemap_buf;
+       struct fiemap              *fiemap = (struct fiemap *)fiemap_buf;
        struct ll_fiemap_info_key  key;
        loff_t                     start;
        loff_t                     end;
        int                        rc;
 
        key = (typeof(key)) {
-               .name = KEY_FIEMAP,
-               .oa = *oa,
-               .fiemap = {
+               .lfik_name = KEY_FIEMAP,
+               .lfik_oa = *oa,
+               .lfik_fiemap = {
                        .fm_start = range->or_start,
                        .fm_length = range->or_end - range->or_start,
                        .fm_extent_count = ORR_NUM_EXTENTS
index aa71b03..9d46776 100644 (file)
@@ -1953,7 +1953,7 @@ void lustre_swab_fid2path(struct getinfo_fid2path *gf)
 }
 EXPORT_SYMBOL(lustre_swab_fid2path);
 
-static void lustre_swab_fiemap_extent(struct ll_fiemap_extent *fm_extent)
+static void lustre_swab_fiemap_extent(struct fiemap_extent *fm_extent)
 {
         __swab64s(&fm_extent->fe_logical);
         __swab64s(&fm_extent->fe_physical);
@@ -1962,7 +1962,7 @@ static void lustre_swab_fiemap_extent(struct ll_fiemap_extent *fm_extent)
         __swab32s(&fm_extent->fe_device);
 }
 
-void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
+void lustre_swab_fiemap(struct fiemap *fiemap)
 {
        __u32 i;
 
index ad250cb..2f0239f 100644 (file)
@@ -3799,18 +3799,18 @@ void lustre_assert_wire_constants(void)
        /* Checks for struct ll_fiemap_info_key */
        LASSERTF((int)sizeof(struct ll_fiemap_info_key) == 248, "found %lld\n",
                 (long long)(int)sizeof(struct ll_fiemap_info_key));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, name[8]) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, name[8]));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->name[8]) == 1, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->name[8]));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, oa) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, oa));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->oa) == 208, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->oa));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, fiemap) == 216, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, fiemap));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap) == 32, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_name[8]) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_name[8]));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_name[8]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_name[8]));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_oa) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_oa));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_oa) == 208, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_oa));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_fiemap) == 216, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_fiemap));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap) == 32, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap));
 
        /* Checks for struct quota_body */
        LASSERTF((int)sizeof(struct quota_body) == 112, "found %lld\n",
@@ -3990,64 +3990,64 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]) == 1, "found %lld\n",
                 (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]));
 
-       /* Checks for struct ll_user_fiemap */
-       LASSERTF((int)sizeof(struct ll_user_fiemap) == 32, "found %lld\n",
-                (long long)(int)sizeof(struct ll_user_fiemap));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_start) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_start));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_start) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_start));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_length) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_length));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_length) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_length));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_flags) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_flags));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_flags));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_mapped_extents) == 20, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_mapped_extents));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extent_count) == 24, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_extent_count));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_reserved) == 28, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_reserved));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extents) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_extents));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extents) == 0, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extents));
+       /* Checks for struct fiemap */
+       LASSERTF((int)sizeof(struct fiemap) == 32, "found %lld\n",
+                (long long)(int)sizeof(struct fiemap));
+       LASSERTF((int)offsetof(struct fiemap, fm_start) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_start));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_start) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_start));
+       LASSERTF((int)offsetof(struct fiemap, fm_length) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_length));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_length) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_length));
+       LASSERTF((int)offsetof(struct fiemap, fm_flags) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_flags));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_flags));
+       LASSERTF((int)offsetof(struct fiemap, fm_mapped_extents) == 20, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_mapped_extents));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_mapped_extents) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_mapped_extents));
+       LASSERTF((int)offsetof(struct fiemap, fm_extent_count) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_extent_count));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_extent_count) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_extent_count));
+       LASSERTF((int)offsetof(struct fiemap, fm_reserved) == 28, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_reserved));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_reserved) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_reserved));
+       LASSERTF((int)offsetof(struct fiemap, fm_extents) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_extents));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_extents) == 0, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_extents));
        CLASSERT(FIEMAP_FLAG_SYNC == 0x00000001);
        CLASSERT(FIEMAP_FLAG_XATTR == 0x00000002);
        CLASSERT(FIEMAP_FLAG_DEVICE_ORDER == 0x40000000);
 
-       /* Checks for struct ll_fiemap_extent */
-       LASSERTF((int)sizeof(struct ll_fiemap_extent) == 56, "found %lld\n",
-                (long long)(int)sizeof(struct ll_fiemap_extent));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_logical) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_logical));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_physical) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_physical));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_length) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_length));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_length) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_length));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_flags) == 40, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_flags));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_device) == 44, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_device));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_device) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_device));
+       /* Checks for struct fiemap_extent */
+       LASSERTF((int)sizeof(struct fiemap_extent) == 56, "found %lld\n",
+                (long long)(int)sizeof(struct fiemap_extent));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_logical) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_logical));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_logical) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_logical));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_physical) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_physical));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_physical) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_physical));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_length) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_length));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_length) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_length));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_flags) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_flags));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_flags));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_device) == 44, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_device));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_device) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_device));
        CLASSERT(FIEMAP_EXTENT_LAST == 0x00000001);
        CLASSERT(FIEMAP_EXTENT_UNKNOWN == 0x00000002);
        CLASSERT(FIEMAP_EXTENT_DELALLOC == 0x00000004);
index f1ece92..d8b42b0 100644 (file)
@@ -1697,9 +1697,9 @@ check_ll_fiemap_info_key(void)
 {
        BLANK_LINE();
        CHECK_STRUCT(ll_fiemap_info_key);
-       CHECK_MEMBER(ll_fiemap_info_key, name[8]);
-       CHECK_MEMBER(ll_fiemap_info_key, oa);
-       CHECK_MEMBER(ll_fiemap_info_key, fiemap);
+       CHECK_MEMBER(ll_fiemap_info_key, lfik_name[8]);
+       CHECK_MEMBER(ll_fiemap_info_key, lfik_oa);
+       CHECK_MEMBER(ll_fiemap_info_key, lfik_fiemap);
 }
 
 static void
@@ -1821,14 +1821,14 @@ static void
 check_ll_user_fiemap(void)
 {
        BLANK_LINE();
-       CHECK_STRUCT(ll_user_fiemap);
-       CHECK_MEMBER(ll_user_fiemap, fm_start);
-       CHECK_MEMBER(ll_user_fiemap, fm_length);
-       CHECK_MEMBER(ll_user_fiemap, fm_flags);
-       CHECK_MEMBER(ll_user_fiemap, fm_mapped_extents);
-       CHECK_MEMBER(ll_user_fiemap, fm_extent_count);
-       CHECK_MEMBER(ll_user_fiemap, fm_reserved);
-       CHECK_MEMBER(ll_user_fiemap, fm_extents);
+       CHECK_STRUCT(fiemap);
+       CHECK_MEMBER(fiemap, fm_start);
+       CHECK_MEMBER(fiemap, fm_length);
+       CHECK_MEMBER(fiemap, fm_flags);
+       CHECK_MEMBER(fiemap, fm_mapped_extents);
+       CHECK_MEMBER(fiemap, fm_extent_count);
+       CHECK_MEMBER(fiemap, fm_reserved);
+       CHECK_MEMBER(fiemap, fm_extents);
 
        CHECK_CDEFINE(FIEMAP_FLAG_SYNC);
        CHECK_CDEFINE(FIEMAP_FLAG_XATTR);
@@ -1839,12 +1839,12 @@ static void
 check_ll_fiemap_extent(void)
 {
        BLANK_LINE();
-       CHECK_STRUCT(ll_fiemap_extent);
-       CHECK_MEMBER(ll_fiemap_extent, fe_logical);
-       CHECK_MEMBER(ll_fiemap_extent, fe_physical);
-       CHECK_MEMBER(ll_fiemap_extent, fe_length);
-       CHECK_MEMBER(ll_fiemap_extent, fe_flags);
-       CHECK_MEMBER(ll_fiemap_extent, fe_device);
+       CHECK_STRUCT(fiemap_extent);
+       CHECK_MEMBER(fiemap_extent, fe_logical);
+       CHECK_MEMBER(fiemap_extent, fe_physical);
+       CHECK_MEMBER(fiemap_extent, fe_length);
+       CHECK_MEMBER(fiemap_extent, fe_flags);
+       CHECK_MEMBER(fiemap_extent, fe_device);
 
        CHECK_CDEFINE(FIEMAP_EXTENT_LAST);
        CHECK_CDEFINE(FIEMAP_EXTENT_UNKNOWN);
index 956ef28..3e41022 100644 (file)
@@ -3808,18 +3808,18 @@ void lustre_assert_wire_constants(void)
        /* Checks for struct ll_fiemap_info_key */
        LASSERTF((int)sizeof(struct ll_fiemap_info_key) == 248, "found %lld\n",
                 (long long)(int)sizeof(struct ll_fiemap_info_key));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, name[8]) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, name[8]));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->name[8]) == 1, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->name[8]));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, oa) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, oa));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->oa) == 208, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->oa));
-       LASSERTF((int)offsetof(struct ll_fiemap_info_key, fiemap) == 216, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_info_key, fiemap));
-       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap) == 32, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_name[8]) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_name[8]));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_name[8]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_name[8]));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_oa) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_oa));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_oa) == 208, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_oa));
+       LASSERTF((int)offsetof(struct ll_fiemap_info_key, lfik_fiemap) == 216, "found %lld\n",
+                (long long)(int)offsetof(struct ll_fiemap_info_key, lfik_fiemap));
+       LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap) == 32, "found %lld\n",
+                (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap));
 
        /* Checks for struct quota_body */
        LASSERTF((int)sizeof(struct quota_body) == 112, "found %lld\n",
@@ -3999,64 +3999,64 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]) == 1, "found %lld\n",
                 (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]));
 
-       /* Checks for struct ll_user_fiemap */
-       LASSERTF((int)sizeof(struct ll_user_fiemap) == 32, "found %lld\n",
-                (long long)(int)sizeof(struct ll_user_fiemap));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_start) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_start));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_start) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_start));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_length) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_length));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_length) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_length));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_flags) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_flags));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_flags));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_mapped_extents) == 20, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_mapped_extents));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_mapped_extents));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extent_count) == 24, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_extent_count));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extent_count));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_reserved) == 28, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_reserved));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_reserved));
-       LASSERTF((int)offsetof(struct ll_user_fiemap, fm_extents) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct ll_user_fiemap, fm_extents));
-       LASSERTF((int)sizeof(((struct ll_user_fiemap *)0)->fm_extents) == 0, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_user_fiemap *)0)->fm_extents));
+       /* Checks for struct fiemap */
+       LASSERTF((int)sizeof(struct fiemap) == 32, "found %lld\n",
+                (long long)(int)sizeof(struct fiemap));
+       LASSERTF((int)offsetof(struct fiemap, fm_start) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_start));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_start) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_start));
+       LASSERTF((int)offsetof(struct fiemap, fm_length) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_length));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_length) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_length));
+       LASSERTF((int)offsetof(struct fiemap, fm_flags) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_flags));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_flags));
+       LASSERTF((int)offsetof(struct fiemap, fm_mapped_extents) == 20, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_mapped_extents));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_mapped_extents) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_mapped_extents));
+       LASSERTF((int)offsetof(struct fiemap, fm_extent_count) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_extent_count));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_extent_count) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_extent_count));
+       LASSERTF((int)offsetof(struct fiemap, fm_reserved) == 28, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_reserved));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_reserved) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_reserved));
+       LASSERTF((int)offsetof(struct fiemap, fm_extents) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap, fm_extents));
+       LASSERTF((int)sizeof(((struct fiemap *)0)->fm_extents) == 0, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap *)0)->fm_extents));
        CLASSERT(FIEMAP_FLAG_SYNC == 0x00000001);
        CLASSERT(FIEMAP_FLAG_XATTR == 0x00000002);
        CLASSERT(FIEMAP_FLAG_DEVICE_ORDER == 0x40000000);
 
-       /* Checks for struct ll_fiemap_extent */
-       LASSERTF((int)sizeof(struct ll_fiemap_extent) == 56, "found %lld\n",
-                (long long)(int)sizeof(struct ll_fiemap_extent));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_logical) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_logical));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_logical));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_physical) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_physical));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_physical));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_length) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_length));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_length) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_length));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_flags) == 40, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_flags));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_flags));
-       LASSERTF((int)offsetof(struct ll_fiemap_extent, fe_device) == 44, "found %lld\n",
-                (long long)(int)offsetof(struct ll_fiemap_extent, fe_device));
-       LASSERTF((int)sizeof(((struct ll_fiemap_extent *)0)->fe_device) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct ll_fiemap_extent *)0)->fe_device));
+       /* Checks for struct fiemap_extent */
+       LASSERTF((int)sizeof(struct fiemap_extent) == 56, "found %lld\n",
+                (long long)(int)sizeof(struct fiemap_extent));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_logical) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_logical));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_logical) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_logical));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_physical) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_physical));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_physical) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_physical));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_length) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_length));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_length) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_length));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_flags) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_flags));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_flags));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_device) == 44, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_device));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_device) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_device));
        CLASSERT(FIEMAP_EXTENT_LAST == 0x00000001);
        CLASSERT(FIEMAP_EXTENT_UNKNOWN == 0x00000002);
        CLASSERT(FIEMAP_EXTENT_DELALLOC == 0x00000004);