#define LL_MAXQUOTAS 3
#endif
+#ifndef SEL_UNIT_SIZE
+#define SEL_UNIT_SIZE 1024llu
+#endif
+
+#ifndef LOV_PATTERN_DEFAULT
+#define LOV_PATTERN_DEFAULT 0xffffffff
+#endif
+
+typedef struct statx lstatx_t;
+
#define lustre_fid struct lu_fid
/* Currently external applications can access this but in the
int llapi_hsm_current_action(const char *path, struct hsm_current_action *hca);
/* JSON handling */
+enum llapi_json_types {
+ LLAPI_JSON_INTEGER = 1,
+ LLAPI_JSON_BIGNUM,
+ LLAPI_JSON_REAL,
+ LLAPI_JSON_STRING
+};
+
+struct llapi_json_item {
+ char *lji_key;
+ __u32 lji_type;
+ union {
+ int lji_integer;
+ __u64 lji_u64;
+ double lji_real;
+ char *lji_string;
+ };
+ struct llapi_json_item *lji_next;
+};
+
+struct llapi_json_item_list {
+ int ljil_item_count;
+ struct llapi_json_item *ljil_items;
+};
+
int llapi_json_init_list(struct llapi_json_item_list **item_list);
int llapi_json_destroy_list(struct llapi_json_item_list **item_list);
int llapi_json_add_item(struct llapi_json_item_list **item_list, char *key,
#define FS_IOC_FSGETXATTR _IOR('X', 31, struct fsxattr)
#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr)
#endif
-#define LL_IOC_FSGETXATTR FS_IOC_FSGETXATTR
-#define LL_IOC_FSSETXATTR FS_IOC_FSSETXATTR
#ifndef FS_XFLAG_PROJINHERIT
#define FS_XFLAG_PROJINHERIT 0x00000200
#endif
struct hsm_action_item hc_hai;
};
-/* JSON objects */
-enum llapi_json_types {
- LLAPI_JSON_INTEGER = 1,
- LLAPI_JSON_BIGNUM,
- LLAPI_JSON_REAL,
- LLAPI_JSON_STRING
-};
-
-struct llapi_json_item {
- char *lji_key;
- __u32 lji_type;
- union {
- int lji_integer;
- __u64 lji_u64;
- double lji_real;
- char *lji_string;
- };
- struct llapi_json_item *lji_next;
-};
-
-struct llapi_json_item_list {
- int ljil_item_count;
- struct llapi_json_item *ljil_items;
-};
-
enum lu_ladvise_type {
LU_LADVISE_INVALID = 0,
LU_LADVISE_WILLREAD = 1,
RETURN(rc);
}
- case LL_IOC_FSGETXATTR:
+ case FS_IOC_FSGETXATTR:
RETURN(ll_ioctl_fsgetxattr(inode, cmd, arg));
- case LL_IOC_FSSETXATTR:
+ case FS_IOC_FSSETXATTR:
RETURN(ll_ioctl_fssetxattr(inode, cmd, arg));
case LL_IOC_PCC_DETACH_BY_FID: {
struct lu_pcc_detach_fid *detach;
fd->fd_designated_mirror = (__u32)arg;
RETURN(0);
}
- case LL_IOC_FSGETXATTR:
+ case FS_IOC_FSGETXATTR:
RETURN(ll_ioctl_fsgetxattr(inode, cmd, arg));
- case LL_IOC_FSSETXATTR:
+ case FS_IOC_FSSETXATTR:
RETURN(ll_ioctl_fssetxattr(inode, cmd, arg));
case BLKSSZGET:
RETURN(put_user(PAGE_SIZE, (int __user *)arg));
#ifdef __NR_statx
#ifndef HAVE_STATX
+
+#define AT_STATX_SYNC_TYPE 0x6000
+#define AT_STATX_FORCE_SYNC 0x2000
+#define AT_STATX_DONT_SYNC 0x4000
+
static __attribute__((unused))
ssize_t statx(int dfd, const char *filename, int flags,
unsigned int mask, struct statx *buffer)
return -errno;
}
- ret = ioctl(fd, LL_IOC_FSGETXATTR, fsx);
+ ret = ioctl(fd, FS_IOC_FSGETXATTR, fsx);
if (ret) {
fprintf(stderr, "%s: failed to get xattr for '%s': %s\n",
progname, pathname, strerror(errno));
if (phc->set_projid)
fsx.fsx_projid = phc->projid;
- ret = ioctl(fd, LL_IOC_FSSETXATTR, &fsx);
+ ret = ioctl(fd, FS_IOC_FSSETXATTR, &fsx);
if (ret)
fprintf(stderr, "%s: failed to set xattr for '%s': %s\n",
progname, pathname, strerror(errno));
if (!phc->keep_projid)
fsx.fsx_projid = 0;
- ret = ioctl(fd, LL_IOC_FSSETXATTR, &fsx);
+ ret = ioctl(fd, FS_IOC_FSSETXATTR, &fsx);
if (ret)
fprintf(stderr, "%s: failed to set xattr for '%s': %s\n",
progname, pathname, strerror(errno));
struct fsxattr fsx;
int rc;
- rc = ioctl(fd, LL_IOC_FSGETXATTR, &fsx);
+ rc = ioctl(fd, FS_IOC_FSGETXATTR, &fsx);
if (rc)
return -errno;
int lsa_rc;
};
+/* The component flags can be set by users at creation/modification time. */
+#define LCME_USER_COMP_FLAGS (LCME_FL_PREF_RW | LCME_FL_NOSYNC | \
+ LCME_FL_EXTENSION)
+
static int llapi_layout_sanity_cb(struct llapi_layout *layout,
void *arg)
{