Re: [PATCH] 9p: use inode->i_lock to protect i_size_write()

2019-01-09 Thread Dominique Martinet
Hou Tao wrote on Thu, Jan 10, 2019: > > Hmm, I'm not familiar with the read/write seqcount code for 32 bit but I > > don't understand how locking here helps besides slowing things down (so > > if the value is constantly updated, the read thread might have a chance > > to be scheduled between two up

Re: [PATCH] 9p: use inode->i_lock to protect i_size_write()

2019-01-09 Thread Hou Tao
Hi, On 2019/1/9 10:38, Dominique Martinet wrote: > Hou Tao wrote on Wed, Jan 09, 2019: >> Use inode->i_lock to protect i_size_write(), else i_size_read() in >> generic_fillattr() may loop infinitely when multiple processes invoke >> v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously und

Re: [PATCH] 9p: use inode->i_lock to protect i_size_write()

2019-01-08 Thread Dominique Martinet
Hou Tao wrote on Wed, Jan 09, 2019: > Use inode->i_lock to protect i_size_write(), else i_size_read() in > generic_fillattr() may loop infinitely when multiple processes invoke > v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under > 32-bit SMP environment, and a soft lockup will be t

[PATCH] 9p: use inode->i_lock to protect i_size_write()

2019-01-08 Thread Hou Tao
Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a soft lockup will be triggered as show below: watchdog: BUG: so