Whamcloud - gitweb
LU-7608 kernel: kernel upgrade [SLES12 SP1 3.12.51-60.25]
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.c
index 80f2794..5a035f8 100644 (file)
@@ -1543,6 +1543,20 @@ noenv:
 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,
@@ -1551,6 +1565,7 @@ static int osd_ios_dl_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,
@@ -1878,10 +1893,16 @@ osd_ios_scan_one(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;
@@ -1946,10 +1967,16 @@ put:
        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;
@@ -1973,10 +2000,16 @@ static int osd_ios_varfid_fill(void *buf, const char *name, int namelen,
        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;
@@ -2009,10 +2042,16 @@ static int osd_ios_dl_fill(void *buf, const char *name, int namelen,
        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;
@@ -2038,10 +2077,16 @@ static int osd_ios_uld_fill(void *buf, const char *name, int namelen,
        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;