__u32 hsb_version; /**< change version */
unsigned int hsb_index; /**< index of bucket */
int hsb_depmax; /**< max depth on bucket */
- long hsb_head[0]; /**< hash-head array */
+ long hsb_head[]; /**< hash-head array */
};
/**
struct lnet_rtrbuf {
struct list_head rb_list; /* chain on rbp_bufs */
struct lnet_rtrbufpool *rb_pool; /* owning pool */
- struct bio_vec rb_kiov[0]; /* the buffer space */
+ struct bio_vec rb_kiov[]; /* the buffer space */
};
#define LNET_PEER_HASHSIZE 503 /* prime! */
/* # active entries for this portal */
int ptl_mt_nmaps;
/* array of active entries' cpu-partition-id */
- int ptl_mt_maps[0];
+ int ptl_mt_maps[];
};
#define LNET_LH_HASH_BITS 12
__u32 ioc_plen2; /* buffers in userspace */
void __user *ioc_pbuf2;
- char ioc_bulk[0];
+ char ioc_bulk[];
};
#define IOCTL_LIBCFS_TYPE long
struct lst_sid rpe_sid; /* peer's session id */
int rpe_fwk_errno; /* framework errno */
int rpe_priv[4]; /* private data */
- char rpe_payload[0]; /* private reply payload */
+ char rpe_payload[]; /* private reply payload */
};
struct lstcon_trans_stat {
#define IBLND_POOL_RETRY 1
struct kib_pages {
- int ibp_npages; /* # pages */
- struct page *ibp_pages[0]; /* page array */
+ int ibp_npages; /* # pages */
+ struct page *ibp_pages[]; /* page array */
};
struct kib_pool;
int tx_desc_size; /* size of this descriptor */
enum lnet_msg_hstatus tx_hstatus; /* health status of tx */
struct kvec tx_hdr; /* virt hdr */
- struct bio_vec tx_payload[0]; /* paged payload */
+ struct bio_vec tx_payload[]; /* paged payload */
};
#define KSOCK_NOOP_TX_SIZE ((int)offsetof(struct ksock_tx, tx_payload[0]))
unsigned int va_count; /* # of buffers */
unsigned int va_size; /* size of each var */
struct cfs_cpt_table *va_cptab; /* cpu partition table */
- void *va_ptrs[0]; /* buffer addresses */
+ void *va_ptrs[]; /* buffer addresses */
};
/* free per-cpu data, see more detail in cfs_percpt_free */
struct list_head grp_trans_list; /* transaction list */
struct list_head grp_ndl_list; /* nodes list */
- struct list_head grp_ndl_hash[0];/* hash table for nodes */
+ struct list_head grp_ndl_hash[]; /* hash table for nodes */
};
#define LST_BATCH_IDLE 0xB0 /* idle batch */
struct lstcon_group *tes_src_grp; /* group run the test */
struct lstcon_group *tes_dst_grp; /* target group */
int tes_paramlen; /* test parameter length */
- char tes_param[0]; /* test parameter */
+ char tes_param[]; /* test parameter */
};
#define LST_GLOBAL_HASHSIZE 503 /* global nodes hash table size */
int bk_sink; /* sink/source */
int bk_alloc; /* # allocated iov */
int bk_niov; /* # iov in bk_iovs */
- struct bio_vec bk_iovs[0];
+ struct bio_vec bk_iovs[];
};
/* message buffer descriptor */
typedef struct list_string {
struct list_string *lstr_next;
int lstr_sz;
- char lstr_str[0];
+ char lstr_str[];
} lstr_t;
#ifndef offsetof
struct lu_heat {
__u32 lh_heat_count;
__u32 lh_padding1;
- __u64 lh_heat[0];
+ __u64 lh_heat[];
};
.fi
The function
};
struct lprocfs_percpu {
- struct lprocfs_counter lp_cntr[0];
+ DECLARE_FLEX_ARRAY(struct lprocfs_counter, lp_cntr);
};
enum lprocfs_stats_lock_ops {
/* has ls_num of counter headers */
struct lprocfs_counter_header *ls_cnt_header;
- struct lprocfs_percpu *ls_percpu[0];
+ struct lprocfs_percpu *ls_percpu[];
};
#define OPC_RANGE(seg) (seg ## _LAST_OPC - seg ## _FIRST_OPC)
struct dx_countlimit limit;
u_int32_t idle_blocks;
u_int8_t ilr_paddingdd2[12];
- unsigned char entries[0];
+ unsigned char entries[];
} __attribute__((packed));
struct iam_leaf_head {
__le16 iih_magic;
__le16 iih_count; /* how many idle blocks in this head */
__le32 iih_next; /* next head for idle blocks */
- __le32 iih_blks[0];
+ __le32 iih_blks[];
} __attribute__((packed));
struct iam_index_head {
struct dx_countlimit limit;
u_int8_t paddingdd[16];
- unsigned char entries[0];
+ unsigned char entries[];
} __attribute__((packed));
struct lvar_root {
struct lvar_leaf_entry {
u_int32_t vle_hash;
u_int16_t vle_keysize;
- u_int8_t vle_key[0];
+ u_int8_t vle_key[];
} __attribute__((packed));
struct osd_inode_id {
bool lsp_is_create;
__u8 lsp_max_inherit;
__u8 lsp_max_inherit_rr;
- __u32 lsp_osts[0];
+ __u32 lsp_osts[];
};
#define lsp_tgts lsp_osts
unsigned int ha_count;
/* ha_map is used as bit flag to indicate handle is remote or local */
DECLARE_BITMAP(ha_map, LMV_MAX_STRIPE_COUNT);
- struct lustre_handle ha_handles[0];
+ struct lustre_handle ha_handles[];
};
/**
__u32 lsm_md_migrate_offset;
__u32 lsm_md_migrate_hash;
char lsm_md_pool_name[LOV_MAXPOOLNAME + 1];
- struct lmv_oinfo lsm_md_oinfo[0];
+ struct lmv_oinfo lsm_md_oinfo[];
};
struct lmv_stripe_object {
/**
* partition data for ptlrpc service
*/
- struct ptlrpc_service_part *srv_parts[0];
+ struct ptlrpc_service_part *srv_parts[];
};
/**
struct lu_fid liru_cfid;
__u64 liru_clid;
int liru_len;
- char liru_name[0];
+ char liru_name[];
};
void scrub_file_init(struct lustre_scrub *scrub, guid_t uuid);
__u32 pud_fsgid;
__u32 pud_cap;
__u32 pud_ngroups;
- __u32 pud_groups[0];
+ __u32 pud_groups[];
};
/*
__u8 bsd_svc; /* SPTLRPC_BULK_SVC_XXXX */
__u8 bsd_flags; /* flags */
__u32 bsd_nob; /* nob of bulk data */
- __u8 bsd_data[0]; /* policy-specific token */
+ __u8 bsd_data[]; /* policy-specific token */
};
extern struct dentry *sptlrpc_debugfs_dir;
__u32 lcfg_nal; /* not used any more */
__u32 lcfg_bufcount;
- __u32 lcfg_buflens[0];
+ __u32 lcfg_buflens[];
};
struct lcfg_type_data {
struct lu_seq_range_array {
__u32 lsra_count;
__u32 lsra_padding;
- struct lu_seq_range lsra_lsr[0];
+ struct lu_seq_range lsra_lsr[];
};
#define LU_SEQ_RANGE_MDT 0x0
* message buffers are packed after padded lm_buflens[] array,
* padded to a multiple of 8 bytes each to align contents.
*/
- __u32 lm_buflens[0];
+ __u32 lm_buflens[];
};
/* The returned result of the SUB request in a batch request */
__u32 lmv_padding2;
__u64 lmv_padding3;
char lmv_pool_name[LOV_MAXPOOLNAME + 1]; /* pool name */
- struct lu_fid lmv_stripe_fids[0]; /* FIDs for each stripe */
+ struct lu_fid lmv_stripe_fids[]; /* FIDs for each stripe */
};
/* stripe count before directory split */
__u8 mne_nid_size; /* size of each NID, by bytes */
__u8 mne_nid_count; /* # of NIDs in buffer */
union {
- lnet_nid_t nids[0]; /* variable size buffer for NIDs. */
- struct lnet_nid nidlist[0];
+ DECLARE_FLEX_ARRAY(lnet_nid_t, nids); /* variable size buffer for NIDs. */
+ DECLARE_FLEX_ARRAY(struct lnet_nid, nidlist);
} u;
};
struct lu_fid gp_fid; /**< parent FID */
__u32 gp_linkno; /**< hardlink number */
__u32 gp_name_size; /**< size of the name field */
- char gp_name[0]; /**< zero-terminated link name */
+ char gp_name[]; /**< zero-terminated link name */
} __attribute__((packed));
enum layout_intent_opc {
* it can locate the next request message via the function
* @batch_update_reqmsg_next() in lustre/include/obj_update.h
*/
- struct lustre_msg burq_reqmsg[0];
+ struct lustre_msg burq_reqmsg[];
};
#define BUT_HEADER_MAGIC 0xBADF0001
/* Unused padding field. */
__u32 buh_padding;
/* Inline buffer used when the RPC request can be packed inline. */
- __u32 buh_inline_data[0];
+ __u32 buh_inline_data[];
};
struct but_update_buffer {
* It can locate the next reply message buffer via the function
* @batch_update_repmsg_next() in lustre/include/obj_update.h
*/
- struct lustre_msg burp_repmsg[0];
+ struct lustre_msg burp_repmsg[];
};
/**
__u32 idd_nperms;
__u32 idd_ngroups;
struct perm_downcall_data idd_perms[N_PERMS_MAX];
- __u32 idd_groups[0];
+ __u32 idd_groups[];
};
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0)
__u32 sdd_magic;
__s64 sdd_sepol_mtime;
__u16 sdd_sepol_len;
- char sdd_sepol[0];
+ char sdd_sepol[];
};
#endif
__u16 sdd_sepol_len;
__u16 sdd_padding1;
__s64 sdd_sepol_mtime;
- char sdd_sepol[0];
+ char sdd_sepol[];
};
#ifdef NEED_QUOTA_DEFS
struct lu_heat {
__u32 lh_count;
__u32 lh_flags;
- __u64 lh_heat[0];
+ __u64 lh_heat[];
};
enum lu_pcc_type {
/* make header's size equal lu_fid */
__u32 fa_padding0;
__u64 fa_padding1;
- struct lu_fid fa_fids[0];
+ struct lu_fid fa_fids[];
};
#define OBD_MAX_FIDS_IN_ARRAY 4096
u64 ll_reserved_2[7];
/* OST target bitmap to record OSTs that contain non-verified OST-obj */
- __u8 ll_ost_bitmap[0];
+ __u8 ll_ost_bitmap[];
};
struct lfsck_assistant_object {
struct md_readdir_info *ldc_mrinfo;
__u64 ldc_hash;
int ldc_count;
- struct stripe_dirent ldc_stripes[0];
+ struct stripe_dirent ldc_stripes[];
};
static inline void stripe_dirent_unload(struct stripe_dirent *stripe)
/* Number of sub-locks in this lock */
int lls_nr;
/* sublock array */
- struct lov_lock_sub lls_sub[0];
+ struct lov_lock_sub lls_sub[];
};
/* Bottom half. */
struct llog_handle *mlfd_llh;
const char *mlfd_oldname;
const char *mlfd_newname;
- char mlfd_data[0];
+ char mlfd_data[];
};
static bool contain_valid_fsname(char *buf, const char *fsname,
struct obd_uuid kr_uuid;
int kr_uid;
struct file *kr_fp;
- char kr_data[0];
+ char kr_data[];
};
static struct list_head kkuc_groups[KUC_GRP_MAX + 1];
size_t oxe_namelen;
bool oxe_exist;
struct rcu_head oxe_rcu;
- char oxe_buf[0];
+ char oxe_buf[];
};
static int osd_oxc_get(struct osd_object *obj, const char *name,
__le16 iih_magic;
__le16 iih_count; /* how many idle blocks in this head */
__le32 iih_next; /* next head for idle blocks */
- __le32 iih_blks[0];
+ __le32 iih_blks[];
};
/*
struct lvar_leaf_entry {
__le32 vle_hash;
__le16 vle_keysize;
- u8 vle_key[0];
+ u8 vle_key[];
};
#define PDIFF(ptr0, ptr1) (((char *)(ptr0)) - ((char *)(ptr1)))
#define FLAG_ACCEPTOR_SUBKEY 0x04
struct krb5_header {
- __u16 kh_tok_id; /* token id */
- __u8 kh_flags; /* acceptor flags */
- __u8 kh_filler; /* 0xff */
- __u16 kh_ec; /* extra count */
- __u16 kh_rrc; /* right rotation count */
- __u64 kh_seq; /* sequence number */
- __u8 kh_cksum[0]; /* checksum */
+ __u16 kh_tok_id; /* token id */
+ __u8 kh_flags; /* acceptor flags */
+ __u8 kh_filler; /* 0xff */
+ __u16 kh_ec; /* extra count */
+ __u16 kh_rrc; /* right rotation count */
+ __u64 kh_seq; /* sequence number */
+ __u8 kh_cksum[]; /* checksum */
};
struct krb5_ctx {
int pd_cursor;
int pd_nthreads;
int pd_groupsize;
- struct ptlrpcd_ctl pd_threads[0];
+ struct ptlrpcd_ctl pd_threads[];
};
/*
__u32 handle_bytes;
int handle_type;
/* file identifier */
- unsigned char f_handle[0];
+ unsigned char f_handle[];
};
#if defined(_ASM_X86_UNISTD_64_H)
/* Current position in buffer */
char *clp_buf_pos;
/* Read buffer with records read from system */
- char clp_buf[0];
+ char clp_buf[];
};
/**
struct snapshot_target *st = si->si_mdt0;
struct list_sub_item {
struct list_head lsi_list;
- char lsi_ssname[0];
+ char lsi_ssname[];
};
struct list_head list_sub_items;
#ifdef HAVE_SERVER_SUPPORT
struct lustre_cfg_entry {
struct list_head lce_list;
- char lce_name[0];
+ char lce_name[];
};
static struct lustre_cfg_entry *lustre_cfg_entry_init(const char *name)