<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/ufs/truncate.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2015-07-06T21:39:30+00:00</updated>
<entry>
<title>ufs: move truncate code into inode.c</title>
<updated>2015-07-06T21:39:30+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-17T16:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=010d331fc315c96607aa6ecdfebb9fcdd349fc9b'/>
<id>urn:sha1:010d331fc315c96607aa6ecdfebb9fcdd349fc9b</id>
<content type='text'>
It is closely tied to block pointers handling there, can benefit
from existing helpers, etc. - no point keeping them apart.

Trimmed the trailing whitespaces in inode.c at the same time.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: no retries are needed on truncate</title>
<updated>2015-07-06T21:39:29+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0d23cf7616253b7960edeae720b9f5dfdccee445'/>
<id>urn:sha1:0d23cf7616253b7960edeae720b9f5dfdccee445</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: ufs_trunc_...() has exclusion with everything that might cause allocations</title>
<updated>2015-07-06T21:39:28+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=687857930d9294100a4636e45b78a244e6ba4125'/>
<id>urn:sha1:687857930d9294100a4636e45b78a244e6ba4125</id>
<content type='text'>
	Currently - on lock_ufs(), eventually - on per-inode mutex.
lock_ufs() used to be mere BKL, which is much weaker, so it needed
those rechecks.  BKL doesn't provide any exclusion once we lose CPU;
its blind replacement, OTOH, _does_.  Making that per-filesystem was
an atrocity, but at least we can simplify life here.  And yes, we
certainly need to make that sucker per-inode - these days inode.c and
truncate.c uses are needed only to protect the block pointers.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: ufs_trunc_direct() always returns 0</title>
<updated>2015-07-06T21:39:27+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6a799d3514217d217b4e74a1ee4f016428582dc5'/>
<id>urn:sha1:6a799d3514217d217b4e74a1ee4f016428582dc5</id>
<content type='text'>
make it return void

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: don't use lock_ufs() for block pointers tree protection</title>
<updated>2015-07-06T21:39:25+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-17T16:02:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=724bb09fdc06d4ff03757b25d6dba9ef1b133e8f'/>
<id>urn:sha1:724bb09fdc06d4ff03757b25d6dba9ef1b133e8f</id>
<content type='text'>
* stores to block pointers are under per-inode seqlock (meta_lock) and
mutex (truncate_mutex)
* fetches of block pointers are either under truncate_mutex, or wrapped
into seqretry loop on meta_lock
* all changes of -&gt;i_size are under truncate_mutex and i_mutex
* all changes of -&gt;i_lastfrag are under truncate_mutex

It's similar to what ext2 is doing; the main difference is that unlike
ext2 we can't rely upon the atomicity of stores into block pointers -
on UFS2 they are 64bit.  So we can't cut the corner when switching
a pointer from NULL to non-NULL as we could in ext2_splice_branch()
and need to use meta_lock on all modifications.

We use seqlock where ext2 uses rwlock; ext2 could probably also benefit
from such change...

Another non-trivial difference is that with UFS we *cannot* have reader
grab truncate_mutex in case of race - it has to keep retrying.  That
might be possible to change, but not until we lift tail unpacking
several levels up in call chain.

After that commit we do *NOT* hold fs-wide serialization on accesses
to block pointers anymore.  Moreover, lock_ufs() can become a normal
mutex now - it's only used on statfs, remount and sync_fs and none
of those uses are recursive.  As the matter of fact, *now* it can be
collapsed with -&gt;s_lock, and be eventually replaced with saner
per-cylinder-group spinlocks, but that's a separate story.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: bforget() indirect blocks before freeing them</title>
<updated>2015-07-06T21:39:24+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-17T23:26:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4af7b2c080715b9452fdaefb7ada72b4dc79593e'/>
<id>urn:sha1:4af7b2c080715b9452fdaefb7ada72b4dc79593e</id>
<content type='text'>
right now it doesn't matter (lock_ufs() serializes everything),
but when we switch to per-inode locking, it will be needed.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: move lock_ufs() down into __ufs_truncate_blocks()</title>
<updated>2015-07-06T21:39:23+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:17:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=493b4537a26b104fb3bd07ff4a46b6ede4288e76'/>
<id>urn:sha1:493b4537a26b104fb3bd07ff4a46b6ede4288e76</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: move truncate_setsize() down into ufs_truncate()</title>
<updated>2015-07-06T21:39:22+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2401aa29ab5c42cc34853a5c1457fbf66593690f'/>
<id>urn:sha1:2401aa29ab5c42cc34853a5c1457fbf66593690f</id>
<content type='text'>
just prior to __ufs_truncate_blocks(), with matching change of calling
conventions

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: switch ufs_evict_inode() to trimmed-down variant of ufs_truncate()</title>
<updated>2015-07-06T21:39:20+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T22:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d622f167b8435c856376edec130053fb56bf83e4'/>
<id>urn:sha1:d622f167b8435c856376edec130053fb56bf83e4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ufs: kill more lock_ufs() calls</title>
<updated>2015-07-06T21:39:19+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-06-16T06:35:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f3e0f3da1b65e84ea82176c1cda03a4b694c9911'/>
<id>urn:sha1:f3e0f3da1b65e84ea82176c1cda03a4b694c9911</id>
<content type='text'>
a) move it inside ufs_truncate()
b) ufs_free_inode() doesn't need it - it's serialized on -&gt;s_lock
c) ufs_write_inode() doesn't need it either (and can be called without
it anyway).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
