*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) {
again:
if (thread_is_running(thread)) {
spin_unlock(&scrub->os_lock);
- if (!(scrub->os_file.sf_flags & SF_AUTO) ||
- (flags & (SS_AUTO_FULL | SS_AUTO_PARTIAL)))
+ if (!(scrub->os_file.sf_flags & SF_AUTO ||
+ scrub->os_partial_scan) ||
+ (flags & SS_AUTO_PARTIAL))
RETURN(-EALREADY);
osd_scrub_join(dev, flags, false);
RETURN(PTR_ERR(filp));
}
- inode = filp->f_path.dentry->d_inode;
+ inode = file_inode(filp);
/* 'What the @fid is' is not imporatant, because the object
* has no OI mapping, and only is visible inside the OSD.*/
lu_igif_build(fid, inode->i_ino, inode->i_generation);
if (it->ooi_user_ready)
RETURN(-EPERM);
+ LASSERT(!scrub->os_partial_scan);
+
if (hash > OSD_OTABLE_MAX_HASH)
hash = OSD_OTABLE_MAX_HASH;