typedef int (*scandir_t)(struct osd_thread_info *, struct osd_device *,
struct dentry *, filldir_t filldir);
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_varfid_fill(struct dir_context *buf, const char *name,
+ int namelen, loff_t offset, __u64 ino,
+ unsigned d_type);
+static int osd_ios_lf_fill(struct dir_context *buf, const char *name,
+ int namelen, loff_t offset, __u64 ino,
+ unsigned d_type);
+static int osd_ios_dl_fill(struct dir_context *buf, const char *name,
+ int namelen, loff_t offset, __u64 ino,
+ unsigned d_type);
+static int osd_ios_uld_fill(struct dir_context *buf, const char *name,
+ int namelen, loff_t offset, __u64 ino,
+ unsigned d_type);
+#else
static int osd_ios_varfid_fill(void *buf, const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type);
static int osd_ios_lf_fill(void *buf, const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type);
static int osd_ios_uld_fill(void *buf, const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type);
+#endif
static int
osd_ios_general_scan(struct osd_thread_info *info, struct osd_device *dev,
* It scans the /lost+found, and for the OST-object (with filter_fid
* or filter_fid_old), move them back to its proper /O/<seq>/d<x>.
*/
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_lf_fill(struct dir_context *buf, const char *name,
+ int namelen,
+#else
static int osd_ios_lf_fill(void *buf, const char *name, int namelen,
+#endif
loff_t offset, __u64 ino, unsigned d_type)
{
- struct osd_ios_filldir_buf *fill_buf = buf;
+ struct osd_ios_filldir_buf *fill_buf =
+ (struct osd_ios_filldir_buf *)buf;
struct osd_thread_info *info = fill_buf->oifb_info;
struct osd_device *dev = fill_buf->oifb_dev;
struct lu_fid *fid = &info->oti_fid;
return 0;
}
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_varfid_fill(struct dir_context *buf, const char *name,
+ int namelen,
+#else
static int osd_ios_varfid_fill(void *buf, const char *name, int namelen,
+#endif
loff_t offset, __u64 ino, unsigned d_type)
{
- struct osd_ios_filldir_buf *fill_buf = buf;
+ struct osd_ios_filldir_buf *fill_buf =
+ (struct osd_ios_filldir_buf *)buf;
struct osd_device *dev = fill_buf->oifb_dev;
struct dentry *child;
int rc;
RETURN(rc);
}
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_dl_fill(struct dir_context *buf, const char *name,
+ int namelen,
+#else
static int osd_ios_dl_fill(void *buf, const char *name, int namelen,
+#endif
loff_t offset, __u64 ino, unsigned d_type)
{
- struct osd_ios_filldir_buf *fill_buf = buf;
+ struct osd_ios_filldir_buf *fill_buf =
+ (struct osd_ios_filldir_buf *)buf;
struct osd_device *dev = fill_buf->oifb_dev;
const struct osd_lf_map *map;
struct dentry *child;
RETURN(rc);
}
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_uld_fill(struct dir_context *buf, const char *name,
+ int namelen,
+#else
static int osd_ios_uld_fill(void *buf, const char *name, int namelen,
+#endif
loff_t offset, __u64 ino, unsigned d_type)
{
- struct osd_ios_filldir_buf *fill_buf = buf;
+ struct osd_ios_filldir_buf *fill_buf =
+ (struct osd_ios_filldir_buf *)buf;
struct dentry *child;
struct lu_fid tfid;
int rc = 0;
RETURN(rc);
}
+#ifdef HAVE_FILLDIR_USE_CTX
+static int osd_ios_root_fill(struct dir_context *buf, const char *name,
+ int namelen,
+#else
static int osd_ios_root_fill(void *buf, const char *name, int namelen,
+#endif
loff_t offset, __u64 ino, unsigned d_type)
{
- struct osd_ios_filldir_buf *fill_buf = buf;
+ struct osd_ios_filldir_buf *fill_buf =
+ (struct osd_ios_filldir_buf *)buf;
struct osd_device *dev = fill_buf->oifb_dev;
const struct osd_lf_map *map;
struct dentry *child;