Re: [PATCH v2 3/4] fat: mark superblock as dirty less often

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

 



Artem Bityutskiy <dedekind1@xxxxxxxxx> writes:

> From: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
>
> This patch is a preparation for further changes. It touches few functions
> in fatent.c and prevents them from marking the superblock as dirty
> unnecessarily often. Namely, instead of marking it as dirty in the internal
> tight loops - do it only once at the end of the functions. And instead of
> marking it as dirty while holding the FAT table lock, do it outside the lock.
>
> The reason for this patch is that marking the superblock as dirty will soon
> become a little bit heavier operation, so it is cleaner to do this only when it
> is necessary.

For it, please use local variable like,


{
       	int fsinfo_dirty = 0;

	while (1) {
        	change free_clusters
                fsinfo_dirty = 1;
        }

        if (fsinfo_dirty)
        	mark_fsinfo_dirty()
}

instead of dirty it always.
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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