X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_scrub.c;h=98a3b24d6f0e3c7dbda98899471b9d392e4652cd;hp=72ed5b8b2a262386ee8cc5c1336959be8e7a6932;hb=3e38436dc09097429e1ca1fbfa3ef4981e124715;hpb=93a6346f8b73f68cb5bc02a3c826ac0e5b4c236e diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c index 72ed5b8..98a3b24 100644 --- a/lustre/osd-ldiskfs/osd_scrub.c +++ b/lustre/osd-ldiskfs/osd_scrub.c @@ -1021,7 +1021,7 @@ static int osd_scrub_main(void *args) int rc; ENTRY; - rc = lu_env_init(&env, LCT_DT_THREAD); + rc = lu_env_init(&env, LCT_LOCAL); if (rc != 0) { CERROR("%.16s: OI scrub, fail to init env, rc = %d\n", LDISKFS_SB(sb)->s_es->s_volume_name, rc); @@ -1796,6 +1796,13 @@ int osd_scrub_setup(const struct lu_env *env, struct osd_device *dev) rc = osd_scrub_start(dev); } + /* it is possible that dcache entries may keep objects after they are + * deleted by OSD. While it looks safe this can cause object data to + * stay until umount causing failures in tests calculating free space, + * e.g. replay-ost-single. Since those dcache entries are not used + * anymore let's just free them after use here */ + shrink_dcache_sb(sb); + RETURN(rc); }