<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/logfs/file.c, branch v4.5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>wrappers for -&gt;i_mutex access</title>
<updated>2016-01-22T23:04:28+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-01-22T20:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5955102c9984fa081b2d570cfac75c97eecf8f3b'/>
<id>5955102c9984fa081b2d570cfac75c97eecf8f3b</id>
<content type='text'>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>VFS: normal filesystems (and lustre): d_inode() annotations</title>
<updated>2015-04-15T19:06:57+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-03-17T22:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2b0143b5c986be1ce8408b3aadc4709e0a94429d'/>
<id>2b0143b5c986be1ce8408b3aadc4709e0a94429d</id>
<content type='text'>
that's the bulk of filesystem drivers dealing with inodes of their own

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
that's the bulk of filesystem drivers dealing with inodes of their own

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>make new_sync_{read,write}() static</title>
<updated>2015-04-12T02:29:40+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-04-03T19:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d5d568975307877e9195f5305f4240e506a2807'/>
<id>5d5d568975307877e9195f5305f4240e506a2807</id>
<content type='text'>
All places outside of core VFS that checked -&gt;read and -&gt;write for being NULL or
called the methods directly are gone now, so NULL {read,write} with non-NULL
{read,write}_iter will do the right thing in all cases.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All places outside of core VFS that checked -&gt;read and -&gt;write for being NULL or
called the methods directly are gone now, so NULL {read,write} with non-NULL
{read,write}_iter will do the right thing in all cases.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>write_iter variants of {__,}generic_file_aio_write()</title>
<updated>2014-05-06T21:38:00+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-04-03T07:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8174202b34c30e0c07231bf63f18ab29af634f0b'/>
<id>8174202b34c30e0c07231bf63f18ab29af634f0b</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switch simple generic_file_aio_read() users to -&gt;read_iter()</title>
<updated>2014-05-06T21:37:55+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-04-02T18:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aad4f8bb42af06371aa0e85bf0cd9d52c0494985'/>
<id>aad4f8bb42af06371aa0e85bf0cd9d52c0494985</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: change invalidatepage prototype to accept length</title>
<updated>2013-05-22T03:17:23+00:00</updated>
<author>
<name>Lukas Czerner</name>
<email>lczerner@redhat.com</email>
</author>
<published>2013-05-22T03:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d47992f86b307985b3215bcf141d56d1849d71df'/>
<id>d47992f86b307985b3215bcf141d56d1849d71df</id>
<content type='text'>
Currently there is no way to truncate partial page where the end
truncate point is not at the end of the page. This is because it was not
needed and the functionality was enough for file system truncate
operation to work properly. However more file systems now support punch
hole feature and it can benefit from mm supporting truncating page just
up to the certain point.

Specifically, with this functionality truncate_inode_pages_range() can
be changed so it supports truncating partial page at the end of the
range (currently it will BUG_ON() if 'end' is not at the end of the
page).

This commit changes the invalidatepage() address space operation
prototype to accept range to be invalidated and update all the instances
for it.

We also change the block_invalidatepage() in the same way and actually
make a use of the new length argument implementing range invalidation.

Actual file system implementations will follow except the file systems
where the changes are really simple and should not change the behaviour
in any way .Implementation for truncate_page_range() which will be able
to accept page unaligned ranges will follow as well.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently there is no way to truncate partial page where the end
truncate point is not at the end of the page. This is because it was not
needed and the functionality was enough for file system truncate
operation to work properly. However more file systems now support punch
hole feature and it can benefit from mm supporting truncating page just
up to the certain point.

Specifically, with this functionality truncate_inode_pages_range() can
be changed so it supports truncating partial page at the end of the
range (currently it will BUG_ON() if 'end' is not at the end of the
page).

This commit changes the invalidatepage() address space operation
prototype to accept range to be invalidated and update all the instances
for it.

We also change the block_invalidatepage() in the same way and actually
make a use of the new length argument implementing range invalidation.

Actual file system implementations will follow except the file systems
where the changes are really simple and should not change the behaviour
in any way .Implementation for truncate_page_range() which will be able
to accept page unaligned ranges will follow as well.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>new helper: file_inode(file)</title>
<updated>2013-02-23T04:31:31+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-23T22:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=496ad9aa8ef448058e36ca7a787c61f2e63f0f54'/>
<id>496ad9aa8ef448058e36ca7a787c61f2e63f0f54</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>logfs: take write mutex lock during fsync and sync</title>
<updated>2012-01-28T06:06:06+00:00</updated>
<author>
<name>Prasad Joshi</name>
<email>prasadjoshi.linux@gmail.com</email>
</author>
<published>2012-01-28T06:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=13ced29cb28996a9bc4f68e43ff0c57eafdb1e21'/>
<id>13ced29cb28996a9bc4f68e43ff0c57eafdb1e21</id>
<content type='text'>
LogFS uses super-&gt;s_write_mutex while writing data to disk. Taking the
same mutex lock in sync and fsync code path solves the following BUG:

------------[ cut here ]------------
kernel BUG at /home/prasad/logfs/dev_bdev.c:134!

Pid: 2387, comm: flush-253:16 Not tainted 3.0.0+ #4 Bochs Bochs
RIP: 0010:[&lt;ffffffffa007deed&gt;]  [&lt;ffffffffa007deed&gt;]
                bdev_writeseg+0x25d/0x270 [logfs]
Call Trace:
[&lt;ffffffffa007c381&gt;] logfs_open_area+0x91/0x150 [logfs]
[&lt;ffffffff8128dcb2&gt;] ? find_level.clone.9+0x62/0x100
[&lt;ffffffffa007c49c&gt;] __logfs_segment_write.clone.20+0x5c/0x190 [logfs]
[&lt;ffffffff810ef005&gt;] ? mempool_kmalloc+0x15/0x20
[&lt;ffffffff810ef383&gt;] ? mempool_alloc+0x53/0x130
[&lt;ffffffffa007c7a4&gt;] logfs_segment_write+0x1d4/0x230 [logfs]
[&lt;ffffffffa0078f8e&gt;] logfs_write_i0+0x12e/0x190 [logfs]
[&lt;ffffffffa0079300&gt;] __logfs_write_rec+0x140/0x220 [logfs]
[&lt;ffffffffa0079444&gt;] logfs_write_rec+0x64/0xd0 [logfs]
[&lt;ffffffffa00795b6&gt;] __logfs_write_buf+0x106/0x110 [logfs]
[&lt;ffffffffa007a13e&gt;] logfs_write_buf+0x4e/0x80 [logfs]
[&lt;ffffffffa0073e33&gt;] __logfs_writepage+0x23/0x80 [logfs]
[&lt;ffffffffa007410c&gt;] logfs_writepage+0xdc/0x110 [logfs]
[&lt;ffffffff810f5ba7&gt;] __writepage+0x17/0x40
[&lt;ffffffff810f6208&gt;] write_cache_pages+0x208/0x4f0
[&lt;ffffffff810f5b90&gt;] ? set_page_dirty+0x70/0x70
[&lt;ffffffff810f653a&gt;] generic_writepages+0x4a/0x70
[&lt;ffffffff810f75d1&gt;] do_writepages+0x21/0x40
[&lt;ffffffff8116b9d1&gt;] writeback_single_inode+0x101/0x250
[&lt;ffffffff8116bdbd&gt;] writeback_sb_inodes+0xed/0x1c0
[&lt;ffffffff8116c5fb&gt;] writeback_inodes_wb+0x7b/0x1e0
[&lt;ffffffff8116cc23&gt;] wb_writeback+0x4c3/0x530
[&lt;ffffffff814d984d&gt;] ? sub_preempt_count+0x9d/0xd0
[&lt;ffffffff8116cd6b&gt;] wb_do_writeback+0xdb/0x290
[&lt;ffffffff814d984d&gt;] ? sub_preempt_count+0x9d/0xd0
[&lt;ffffffff814d6208&gt;] ? _raw_spin_unlock_irqrestore+0x18/0x40
[&lt;ffffffff8105aa5a&gt;] ? del_timer+0x8a/0x120
[&lt;ffffffff8116cfac&gt;] bdi_writeback_thread+0x8c/0x2e0
[&lt;ffffffff8116cf20&gt;] ? wb_do_writeback+0x290/0x290
[&lt;ffffffff8106d2e6&gt;] kthread+0x96/0xa0
[&lt;ffffffff814de514&gt;] kernel_thread_helper+0x4/0x10
[&lt;ffffffff8106d250&gt;] ? kthread_worker_fn+0x190/0x190
[&lt;ffffffff814de510&gt;] ? gs_change+0xb/0xb
RIP  [&lt;ffffffffa007deed&gt;] bdev_writeseg+0x25d/0x270 [logfs]
---[ end trace 0211ad60a57657c4 ]---

Reviewed-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Prasad Joshi &lt;prasadjoshi.linux@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LogFS uses super-&gt;s_write_mutex while writing data to disk. Taking the
same mutex lock in sync and fsync code path solves the following BUG:

------------[ cut here ]------------
kernel BUG at /home/prasad/logfs/dev_bdev.c:134!

Pid: 2387, comm: flush-253:16 Not tainted 3.0.0+ #4 Bochs Bochs
RIP: 0010:[&lt;ffffffffa007deed&gt;]  [&lt;ffffffffa007deed&gt;]
                bdev_writeseg+0x25d/0x270 [logfs]
Call Trace:
[&lt;ffffffffa007c381&gt;] logfs_open_area+0x91/0x150 [logfs]
[&lt;ffffffff8128dcb2&gt;] ? find_level.clone.9+0x62/0x100
[&lt;ffffffffa007c49c&gt;] __logfs_segment_write.clone.20+0x5c/0x190 [logfs]
[&lt;ffffffff810ef005&gt;] ? mempool_kmalloc+0x15/0x20
[&lt;ffffffff810ef383&gt;] ? mempool_alloc+0x53/0x130
[&lt;ffffffffa007c7a4&gt;] logfs_segment_write+0x1d4/0x230 [logfs]
[&lt;ffffffffa0078f8e&gt;] logfs_write_i0+0x12e/0x190 [logfs]
[&lt;ffffffffa0079300&gt;] __logfs_write_rec+0x140/0x220 [logfs]
[&lt;ffffffffa0079444&gt;] logfs_write_rec+0x64/0xd0 [logfs]
[&lt;ffffffffa00795b6&gt;] __logfs_write_buf+0x106/0x110 [logfs]
[&lt;ffffffffa007a13e&gt;] logfs_write_buf+0x4e/0x80 [logfs]
[&lt;ffffffffa0073e33&gt;] __logfs_writepage+0x23/0x80 [logfs]
[&lt;ffffffffa007410c&gt;] logfs_writepage+0xdc/0x110 [logfs]
[&lt;ffffffff810f5ba7&gt;] __writepage+0x17/0x40
[&lt;ffffffff810f6208&gt;] write_cache_pages+0x208/0x4f0
[&lt;ffffffff810f5b90&gt;] ? set_page_dirty+0x70/0x70
[&lt;ffffffff810f653a&gt;] generic_writepages+0x4a/0x70
[&lt;ffffffff810f75d1&gt;] do_writepages+0x21/0x40
[&lt;ffffffff8116b9d1&gt;] writeback_single_inode+0x101/0x250
[&lt;ffffffff8116bdbd&gt;] writeback_sb_inodes+0xed/0x1c0
[&lt;ffffffff8116c5fb&gt;] writeback_inodes_wb+0x7b/0x1e0
[&lt;ffffffff8116cc23&gt;] wb_writeback+0x4c3/0x530
[&lt;ffffffff814d984d&gt;] ? sub_preempt_count+0x9d/0xd0
[&lt;ffffffff8116cd6b&gt;] wb_do_writeback+0xdb/0x290
[&lt;ffffffff814d984d&gt;] ? sub_preempt_count+0x9d/0xd0
[&lt;ffffffff814d6208&gt;] ? _raw_spin_unlock_irqrestore+0x18/0x40
[&lt;ffffffff8105aa5a&gt;] ? del_timer+0x8a/0x120
[&lt;ffffffff8116cfac&gt;] bdi_writeback_thread+0x8c/0x2e0
[&lt;ffffffff8116cf20&gt;] ? wb_do_writeback+0x290/0x290
[&lt;ffffffff8106d2e6&gt;] kthread+0x96/0xa0
[&lt;ffffffff814de514&gt;] kernel_thread_helper+0x4/0x10
[&lt;ffffffff8106d250&gt;] ? kthread_worker_fn+0x190/0x190
[&lt;ffffffff814de510&gt;] ? gs_change+0xb/0xb
RIP  [&lt;ffffffffa007deed&gt;] bdev_writeseg+0x25d/0x270 [logfs]
---[ end trace 0211ad60a57657c4 ]---

Reviewed-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Prasad Joshi &lt;prasadjoshi.linux@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: push i_mutex and filemap_write_and_wait down into -&gt;fsync() handlers</title>
<updated>2011-07-21T00:47:59+00:00</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2011-07-17T00:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=02c24a82187d5a628c68edfe71ae60dc135cd178'/>
<id>02c24a82187d5a628c68edfe71ae60dc135cd178</id>
<content type='text'>
Btrfs needs to be able to control how filemap_write_and_wait_range() is called
in fsync to make it less of a painful operation, so push down taking i_mutex and
the calling of filemap_write_and_wait() down into the -&gt;fsync() handlers.  Some
file systems can drop taking the i_mutex altogether it seems, like ext3 and
ocfs2.  For correctness sake I just pushed everything down in all cases to make
sure that we keep the current behavior the same for everybody, and then each
individual fs maintainer can make up their mind about what to do from there.
Thanks,

Acked-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Btrfs needs to be able to control how filemap_write_and_wait_range() is called
in fsync to make it less of a painful operation, so push down taking i_mutex and
the calling of filemap_write_and_wait() down into the -&gt;fsync() handlers.  Some
file systems can drop taking the i_mutex altogether it seems, like ext3 and
ocfs2.  For correctness sake I just pushed everything down in all cases to make
sure that we keep the current behavior the same for everybody, and then each
individual fs maintainer can make up their mind about what to do from there.
Thanks,

Acked-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>userns: rename is_owner_or_cap to inode_owner_or_capable</title>
<updated>2011-03-24T02:47:13+00:00</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serge@hallyn.com</email>
</author>
<published>2011-03-23T23:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e1496707560ecf98e9b0604622c0990f94861d3'/>
<id>2e1496707560ecf98e9b0604622c0990f94861d3</id>
<content type='text'>
And give it a kernel-doc comment.

[akpm@linux-foundation.org: btrfs changed in linux-next]
Signed-off-by: Serge E. Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And give it a kernel-doc comment.

[akpm@linux-foundation.org: btrfs changed in linux-next]
Signed-off-by: Serge E. Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
