RE: [PATCH v2 02/10] exfat: add exfat_get_empty_dentry_set() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Sent: Monday, March 4, 2024 12:43 PM
> > >
> > > This patch set is intended to improve the performance of sync
> > > dentry, I don't think it is a good idea to change other logic in this
> patch set.
> > Yeah, as you said, this patch set should keep the original logic
> > except for the sync related parts. The reason I left a review comment
> > is because the code before this patch set allows deleted dentries to
> > follow unused dentries.
> 
> Which commit changed to allow deleted dentries to follow unused dentries?
Not changed. It has been allowed from the initial commit as follows.
5f2aa075070c ("exfat: add inode operations")

> 
> The following code still exists if without this patch set. It does not
> allow deleted dentries to follow unused dentries.

It may be the same part as the code you mentioned, but remember that
the first if-statement handles both an unused dentry and
a deleted dentry together.

static int exfat_search_empty_slot(...)
{
    ...
    if (type == TYPE_UNUSED || type == TYPE_DELETED) {
        ...
    } else {
        if (hint_femp->eidx != EXFAT_HINT_NONE &&
             hint_femp->count == CNT_UNUSED_HIT) {
             /* unused empty group means
              * an empty group which includes
              * unused dentry
              */
             exfat_fs_error(sb,
                         "found bogus dentry(%d) beyond unused empty group(%d) (start_clu : %u, cur_clu : %u)",
                         dentry, hint_femp->eidx,
                         p_dir->dir, clu.dir);
             return -EIO;
       }
       ...
    }
    ...
}

> 
> > Please let me know if I missed anything.
> >
> > > Patch [7/10] moves the check from exfat_search_empty_slot() to
> > > exfat_validate_empty_dentry_set().
> > >
> > > -                                if (hint_femp->eidx !=
> > EXFAT_HINT_NONE &&
> > > -                                    hint_femp->count ==
> > CNT_UNUSED_HIT) {
> > > -                                        /* unused empty group
> > means
> > > -                                         * an empty group
> > which includes
> > > -                                         * unused dentry
> > > -                                         */
> > > -                                        exfat_fs_error(sb,
> > > -                                                "found bogus
> > dentry(%d) beyond
> > > unused empty group(%d) (start_clu : %u, cur_clu : %u)",
> > > -                                                dentry,
> > hint_femp->eidx,
> > > -                                                p_dir->dir,
> > clu.dir);
> > >







[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux