Re: [PATCHv5 04/16] VFS: add memory barrier to sb_mark_clean and sb_mark_dirty

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

 



On Sun, 2010-06-06 at 20:16 +0300, Artem Bityutskiy wrote:
> On Sun, 2010-06-06 at 17:50 +0300, Artem Bityutskiy wrote:
> >  void sb_mark_dirty(struct super_block *sb);
> >  static inline void sb_mark_clean(struct super_block *sb)
> >  {
> >  	sb->s_dirty = 0;
> > +	/*
> > +	 * Normally FSes first unset the sb->s_dirty flag, and then start
> > +	 * synchronizing the SB. The memory barrier ensures this order.
> > +	 */
> > +	smp_mb();
> ...
> >  void sb_mark_dirty(struct super_block *sb)
> >  {
> > +	/*
> > +	 * Normally FSes modify the SB, and then mark it as dirty. The memory
> > +	 * barrier ensures this order.
> > +	 */
> > +	smp_mb();
> ...
> 
> Hmm, these ones should be 'mb()', not 'smp_mb()'.

Actually no, sorry, I completely missed that all memory barriers are a
compiler barriers. I thought smp_mb() is nought, which is not true -
smp_mb() is a barrier() on UP.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

--
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