rc = PTR_ERR(th);
CDEBUG(D_LFSCK, "%s: fail to start trans for scrub op %d "
DFID" => %u/%u: rc = %d\n", osd_name(dev), ops,
- PFID(fid), id->oii_ino, id->oii_gen, rc);
+ PFID(fid), id ? id->oii_ino : -1, id ? id->oii_gen : -1,
+ rc);
RETURN(rc);
}
iput(inode);
if (oii != NULL) {
- LASSERT(list_empty(&oii->oii_list));
+ spin_lock(&scrub->os_lock);
+ if (likely(!list_empty(&oii->oii_list)))
+ list_del(&oii->oii_list);
+ spin_unlock(&scrub->os_lock);
OBD_FREE_PTR(oii);
}
oii = list_entry(scrub->os_inconsistent_items.next,
struct osd_inconsistent_item, oii_list);
- list_del_init(&oii->oii_list);
spin_unlock(&scrub->os_lock);
*oic = &oii->oii_cache;
sf->sf_status = SS_SCANNING;
}
- if (flags & SS_AUTO_FULL) {
- sf->sf_flags |= SF_AUTO;
- scrub->os_full_speed = 1;
- }
-
if (sf->sf_flags & (SF_RECREATED | SF_INCONSISTENT | SF_UPGRADE))
scrub->os_full_speed = 1;
else
scrub->os_full_speed = 0;
+ if (flags & SS_AUTO_FULL) {
+ sf->sf_flags |= SF_AUTO;
+ scrub->os_full_speed = 1;
+ }
+
scrub->os_new_checked = 0;
if (sf->sf_pos_last_checkpoint != 0)
sf->sf_pos_latest_start = sf->sf_pos_last_checkpoint + 1;
*count < max) {
if (param.offset +
ldiskfs_itable_unused_count(param.sb, desc) >
- LDISKFS_INODES_PER_GROUP(param.sb))
+ LDISKFS_INODES_PER_GROUP(param.sb)) {
+ *pos = 1 + (param.bg + 1) *
+ LDISKFS_INODES_PER_GROUP(param.sb);
goto next_group;
+ }
rc = next(info, dev, ¶m, &oic, noslot);
switch (rc) {
* 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,
+static int osd_ios_lf_fill(struct dir_context *buf,
#else
-static int osd_ios_lf_fill(void *buf, const char *name, int namelen,
+static int osd_ios_lf_fill(void *buf,
#endif
+ const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type)
{
struct osd_ios_filldir_buf *fill_buf =
}
#ifdef HAVE_FILLDIR_USE_CTX
-static int osd_ios_varfid_fill(struct dir_context *buf, const char *name,
- int namelen,
+static int osd_ios_varfid_fill(struct dir_context *buf,
#else
-static int osd_ios_varfid_fill(void *buf, const char *name, int namelen,
+static int osd_ios_varfid_fill(void *buf,
#endif
+ const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type)
{
struct osd_ios_filldir_buf *fill_buf =
}
#ifdef HAVE_FILLDIR_USE_CTX
-static int osd_ios_dl_fill(struct dir_context *buf, const char *name,
- int namelen,
+static int osd_ios_dl_fill(struct dir_context *buf,
#else
-static int osd_ios_dl_fill(void *buf, const char *name, int namelen,
+static int osd_ios_dl_fill(void *buf,
#endif
+ const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type)
{
struct osd_ios_filldir_buf *fill_buf =
}
#ifdef HAVE_FILLDIR_USE_CTX
-static int osd_ios_uld_fill(struct dir_context *buf, const char *name,
- int namelen,
+static int osd_ios_uld_fill(struct dir_context *buf,
#else
-static int osd_ios_uld_fill(void *buf, const char *name, int namelen,
+static int osd_ios_uld_fill(void *buf,
#endif
+ const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type)
{
struct osd_ios_filldir_buf *fill_buf =
}
#ifdef HAVE_FILLDIR_USE_CTX
-static int osd_ios_root_fill(struct dir_context *buf, const char *name,
- int namelen,
+static int osd_ios_root_fill(struct dir_context *buf,
#else
-static int osd_ios_root_fill(void *buf, const char *name, int namelen,
+static int osd_ios_root_fill(void *buf,
#endif
+ const char *name, int namelen,
loff_t offset, __u64 ino, unsigned d_type)
{
struct osd_ios_filldir_buf *fill_buf =