<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs, branch v3.8-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'ecryptfs-3.8-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs</title>
<updated>2013-01-03T01:33:50+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-01-03T01:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=007f6c3a63e0831ff5a34bde072db08e917134c8'/>
<id>007f6c3a63e0831ff5a34bde072db08e917134c8</id>
<content type='text'>
Pull ecryptfs fixes from Tyler Hicks:
 "Two self-explanatory fixes and a third patch which improves
  performance: when overwriting a full page in the eCryptfs page cache,
  skip reading in and decrypting the corresponding lower page."

* tag 'ecryptfs-3.8-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  fs/ecryptfs/crypto.c: make ecryptfs_encode_for_filename() static
  eCryptfs: fix to use list_for_each_entry_safe() when delete items
  eCryptfs: Avoid unnecessary disk read and data decryption during writing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ecryptfs fixes from Tyler Hicks:
 "Two self-explanatory fixes and a third patch which improves
  performance: when overwriting a full page in the eCryptfs page cache,
  skip reading in and decrypting the corresponding lower page."

* tag 'ecryptfs-3.8-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  fs/ecryptfs/crypto.c: make ecryptfs_encode_for_filename() static
  eCryptfs: fix to use list_for_each_entry_safe() when delete items
  eCryptfs: Avoid unnecessary disk read and data decryption during writing
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4</title>
<updated>2013-01-02T17:57:34+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-01-02T17:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5439ca6b8ff8cf8d758c19eb28b617a5912904ee'/>
<id>5439ca6b8ff8cf8d758c19eb28b617a5912904ee</id>
<content type='text'>
Pull ext4 bug fixes from Ted Ts'o:
 "Various bug fixes for ext4.  Perhaps the most serious bug fixed is one
  which could cause file system corruptions when performing file punch
  operations."

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: avoid hang when mounting non-journal filesystems with orphan list
  ext4: lock i_mutex when truncating orphan inodes
  ext4: do not try to write superblock on ro remount w/o journal
  ext4: include journal blocks in df overhead calcs
  ext4: remove unaligned AIO warning printk
  ext4: fix an incorrect comment about i_mutex
  ext4: fix deadlock in journal_unmap_buffer()
  ext4: split off ext4_journalled_invalidatepage()
  jbd2: fix assertion failure in jbd2_journal_flush()
  ext4: check dioread_nolock on remount
  ext4: fix extent tree corruption caused by hole punch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ext4 bug fixes from Ted Ts'o:
 "Various bug fixes for ext4.  Perhaps the most serious bug fixed is one
  which could cause file system corruptions when performing file punch
  operations."

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: avoid hang when mounting non-journal filesystems with orphan list
  ext4: lock i_mutex when truncating orphan inodes
  ext4: do not try to write superblock on ro remount w/o journal
  ext4: include journal blocks in df overhead calcs
  ext4: remove unaligned AIO warning printk
  ext4: fix an incorrect comment about i_mutex
  ext4: fix deadlock in journal_unmap_buffer()
  ext4: split off ext4_journalled_invalidatepage()
  jbd2: fix assertion failure in jbd2_journal_flush()
  ext4: check dioread_nolock on remount
  ext4: fix extent tree corruption caused by hole punch
</pre>
</div>
</content>
</entry>
<entry>
<title>mempolicy: remove arg from mpol_parse_str, mpol_to_str</title>
<updated>2013-01-02T17:27:10+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2013-01-02T10:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a7a88b23737095e6c18a20c5d4eef9e25ec5b829'/>
<id>a7a88b23737095e6c18a20c5d4eef9e25ec5b829</id>
<content type='text'>
Remove the unused argument (formerly no_context) from mpol_parse_str()
and from mpol_to_str().

Signed-off-by: Hugh Dickins &lt;hughd@google.com&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>
Remove the unused argument (formerly no_context) from mpol_parse_str()
and from mpol_to_str().

Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>epoll: prevent missed events on EPOLL_CTL_MOD</title>
<updated>2013-01-02T17:16:43+00:00</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2013-01-01T21:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=128dd1759d96ad36c379240f8b9463e8acfd37a1'/>
<id>128dd1759d96ad36c379240f8b9463e8acfd37a1</id>
<content type='text'>
EPOLL_CTL_MOD sets the interest mask before calling f_op-&gt;poll() to
ensure events are not missed.  Since the modifications to the interest
mask are not protected by the same lock as ep_poll_callback, we need to
ensure the change is visible to other CPUs calling ep_poll_callback.

We also need to ensure f_op-&gt;poll() has an up-to-date view of past
events which occured before we modified the interest mask.  So this
barrier also pairs with the barrier in wq_has_sleeper().

This should guarantee either ep_poll_callback or f_op-&gt;poll() (or both)
will notice the readiness of a recently-ready/modified item.

This issue was encountered by Andreas Voellmy and Junchang(Jason) Wang in:
http://thread.gmane.org/gmane.linux.kernel/1408782/

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Cc: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Davide Libenzi &lt;davidel@xmailserver.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andreas Voellmy &lt;andreas.voellmy@yale.edu&gt;
Tested-by: "Junchang(Jason) Wang" &lt;junchang.wang@yale.edu&gt;
Cc: netdev@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EPOLL_CTL_MOD sets the interest mask before calling f_op-&gt;poll() to
ensure events are not missed.  Since the modifications to the interest
mask are not protected by the same lock as ep_poll_callback, we need to
ensure the change is visible to other CPUs calling ep_poll_callback.

We also need to ensure f_op-&gt;poll() has an up-to-date view of past
events which occured before we modified the interest mask.  So this
barrier also pairs with the barrier in wq_has_sleeper().

This should guarantee either ep_poll_callback or f_op-&gt;poll() (or both)
will notice the readiness of a recently-ready/modified item.

This issue was encountered by Andreas Voellmy and Junchang(Jason) Wang in:
http://thread.gmane.org/gmane.linux.kernel/1408782/

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Cc: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Davide Libenzi &lt;davidel@xmailserver.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andreas Voellmy &lt;andreas.voellmy@yale.edu&gt;
Tested-by: "Junchang(Jason) Wang" &lt;junchang.wang@yale.edu&gt;
Cc: netdev@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: avoid hang when mounting non-journal filesystems with orphan list</title>
<updated>2012-12-27T06:42:50+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-12-27T06:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0e9a9a1ad619e7e987815d20262d36a2f95717ca'/>
<id>0e9a9a1ad619e7e987815d20262d36a2f95717ca</id>
<content type='text'>
When trying to mount a file system which does not contain a journal,
but which does have a orphan list containing an inode which needs to
be truncated, the mount call with hang forever in
ext4_orphan_cleanup() because ext4_orphan_del() will return
immediately without removing the inode from the orphan list, leading
to an uninterruptible loop in kernel code which will busy out one of
the CPU's on the system.

This can be trivially reproduced by trying to mount the file system
found in tests/f_orphan_extents_inode/image.gz from the e2fsprogs
source tree.  If a malicious user were to put this on a USB stick, and
mount it on a Linux desktop which has automatic mounts enabled, this
could be considered a potential denial of service attack.  (Not a big
deal in practice, but professional paranoids worry about such things,
and have even been known to allocate CVE numbers for such problems.)

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When trying to mount a file system which does not contain a journal,
but which does have a orphan list containing an inode which needs to
be truncated, the mount call with hang forever in
ext4_orphan_cleanup() because ext4_orphan_del() will return
immediately without removing the inode from the orphan list, leading
to an uninterruptible loop in kernel code which will busy out one of
the CPU's on the system.

This can be trivially reproduced by trying to mount the file system
found in tests/f_orphan_extents_inode/image.gz from the e2fsprogs
source tree.  If a malicious user were to put this on a USB stick, and
mount it on a Linux desktop which has automatic mounts enabled, this
could be considered a potential denial of service attack.  (Not a big
deal in practice, but professional paranoids worry about such things,
and have even been known to allocate CVE numbers for such problems.)

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: lock i_mutex when truncating orphan inodes</title>
<updated>2012-12-27T06:42:48+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-12-27T06:42:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=721e3eba21e43532e438652dd8f1fcdfce3187e7'/>
<id>721e3eba21e43532e438652dd8f1fcdfce3187e7</id>
<content type='text'>
Commit c278531d39 added a warning when ext4_flush_unwritten_io() is
called without i_mutex being taken.  It had previously not been taken
during orphan cleanup since races weren't possible at that point in
the mount process, but as a result of this c278531d39, we will now see
a kernel WARN_ON in this case.  Take the i_mutex in
ext4_orphan_cleanup() to suppress this warning.

Reported-by: Alexander Beregalov &lt;a.beregalov@gmail.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit c278531d39 added a warning when ext4_flush_unwritten_io() is
called without i_mutex being taken.  It had previously not been taken
during orphan cleanup since races weren't possible at that point in
the mount process, but as a result of this c278531d39, we will now see
a kernel WARN_ON in this case.  Take the i_mutex in
ext4_orphan_cleanup() to suppress this warning.

Reported-by: Alexander Beregalov &lt;a.beregalov@gmail.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Reviewed-by: Zheng Liu &lt;wenqing.lz@taobao.com&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>f2fs: Don't assign e_id in f2fs_acl_from_disk</title>
<updated>2012-12-26T04:05:15+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-12-22T09:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=48c6d1217e3dc743e7d3ad9b9def8d4810d13a85'/>
<id>48c6d1217e3dc743e7d3ad9b9def8d4810d13a85</id>
<content type='text'>
With user namespaces enabled building f2fs fails with:

 CC      fs/f2fs/acl.o
fs/f2fs/acl.c: In function ‘f2fs_acl_from_disk’:
fs/f2fs/acl.c:85:21: error: ‘struct posix_acl_entry’ has no member named ‘e_id’
make[2]: *** [fs/f2fs/acl.o] Error 1
make[2]: Target `__build' not remade because of errors.

e_id is a backwards compatibility field only used for file systems
that haven't been converted to use kuids and kgids.  When the posix
acl tag field is neither ACL_USER nor ACL_GROUP assigning e_id is
unnecessary.  Remove the assignment so f2fs will build with user
namespaces enabled.

Cc: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Cc: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Acked-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With user namespaces enabled building f2fs fails with:

 CC      fs/f2fs/acl.o
fs/f2fs/acl.c: In function ‘f2fs_acl_from_disk’:
fs/f2fs/acl.c:85:21: error: ‘struct posix_acl_entry’ has no member named ‘e_id’
make[2]: *** [fs/f2fs/acl.o] Error 1
make[2]: Target `__build' not remade because of errors.

e_id is a backwards compatibility field only used for file systems
that haven't been converted to use kuids and kgids.  When the posix
acl tag field is neither ACL_USER nor ACL_GROUP assigning e_id is
unnecessary.  Remove the assignment so f2fs will build with user
namespaces enabled.

Cc: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Cc: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Acked-by: Jaegeuk Kim &lt;jaegeuk.kim@samsung.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>proc: Allow proc_free_inum to be called from any context</title>
<updated>2012-12-26T00:23:12+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-12-22T04:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dfb2ea45becb198beeb75350d0b7b7ad9076a38f'/>
<id>dfb2ea45becb198beeb75350d0b7b7ad9076a38f</id>
<content type='text'>
While testing the pid namespace code I hit this nasty warning.

[  176.262617] ------------[ cut here ]------------
[  176.263388] WARNING: at /home/eric/projects/linux/linux-userns-devel/kernel/softirq.c:160 local_bh_enable_ip+0x7a/0xa0()
[  176.265145] Hardware name: Bochs
[  176.265677] Modules linked in:
[  176.266341] Pid: 742, comm: bash Not tainted 3.7.0userns+ #18
[  176.266564] Call Trace:
[  176.266564]  [&lt;ffffffff810a539f&gt;] warn_slowpath_common+0x7f/0xc0
[  176.266564]  [&lt;ffffffff810a53fa&gt;] warn_slowpath_null+0x1a/0x20
[  176.266564]  [&lt;ffffffff810ad9ea&gt;] local_bh_enable_ip+0x7a/0xa0
[  176.266564]  [&lt;ffffffff819308c9&gt;] _raw_spin_unlock_bh+0x19/0x20
[  176.266564]  [&lt;ffffffff8123dbda&gt;] proc_free_inum+0x3a/0x50
[  176.266564]  [&lt;ffffffff8111d0dc&gt;] free_pid_ns+0x1c/0x80
[  176.266564]  [&lt;ffffffff8111d195&gt;] put_pid_ns+0x35/0x50
[  176.266564]  [&lt;ffffffff810c608a&gt;] put_pid+0x4a/0x60
[  176.266564]  [&lt;ffffffff8146b177&gt;] tty_ioctl+0x717/0xc10
[  176.266564]  [&lt;ffffffff810aa4d5&gt;] ? wait_consider_task+0x855/0xb90
[  176.266564]  [&lt;ffffffff81086bf9&gt;] ? default_spin_lock_flags+0x9/0x10
[  176.266564]  [&lt;ffffffff810cab0a&gt;] ? remove_wait_queue+0x5a/0x70
[  176.266564]  [&lt;ffffffff811e37e8&gt;] do_vfs_ioctl+0x98/0x550
[  176.266564]  [&lt;ffffffff810b8a0f&gt;] ? recalc_sigpending+0x1f/0x60
[  176.266564]  [&lt;ffffffff810b9127&gt;] ? __set_task_blocked+0x37/0x80
[  176.266564]  [&lt;ffffffff810ab95b&gt;] ? sys_wait4+0xab/0xf0
[  176.266564]  [&lt;ffffffff811e3d31&gt;] sys_ioctl+0x91/0xb0
[  176.266564]  [&lt;ffffffff810a95f0&gt;] ? task_stopped_code+0x50/0x50
[  176.266564]  [&lt;ffffffff81939199&gt;] system_call_fastpath+0x16/0x1b
[  176.266564] ---[ end trace 387af88219ad6143 ]---

It turns out that spin_unlock_bh(proc_inum_lock) is not safe when
put_pid is called with another spinlock held and irqs disabled.

For now take the easy path and use spin_lock_irqsave(proc_inum_lock)
in proc_free_inum and spin_loc_irq in proc_alloc_inum(proc_inum_lock).

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While testing the pid namespace code I hit this nasty warning.

[  176.262617] ------------[ cut here ]------------
[  176.263388] WARNING: at /home/eric/projects/linux/linux-userns-devel/kernel/softirq.c:160 local_bh_enable_ip+0x7a/0xa0()
[  176.265145] Hardware name: Bochs
[  176.265677] Modules linked in:
[  176.266341] Pid: 742, comm: bash Not tainted 3.7.0userns+ #18
[  176.266564] Call Trace:
[  176.266564]  [&lt;ffffffff810a539f&gt;] warn_slowpath_common+0x7f/0xc0
[  176.266564]  [&lt;ffffffff810a53fa&gt;] warn_slowpath_null+0x1a/0x20
[  176.266564]  [&lt;ffffffff810ad9ea&gt;] local_bh_enable_ip+0x7a/0xa0
[  176.266564]  [&lt;ffffffff819308c9&gt;] _raw_spin_unlock_bh+0x19/0x20
[  176.266564]  [&lt;ffffffff8123dbda&gt;] proc_free_inum+0x3a/0x50
[  176.266564]  [&lt;ffffffff8111d0dc&gt;] free_pid_ns+0x1c/0x80
[  176.266564]  [&lt;ffffffff8111d195&gt;] put_pid_ns+0x35/0x50
[  176.266564]  [&lt;ffffffff810c608a&gt;] put_pid+0x4a/0x60
[  176.266564]  [&lt;ffffffff8146b177&gt;] tty_ioctl+0x717/0xc10
[  176.266564]  [&lt;ffffffff810aa4d5&gt;] ? wait_consider_task+0x855/0xb90
[  176.266564]  [&lt;ffffffff81086bf9&gt;] ? default_spin_lock_flags+0x9/0x10
[  176.266564]  [&lt;ffffffff810cab0a&gt;] ? remove_wait_queue+0x5a/0x70
[  176.266564]  [&lt;ffffffff811e37e8&gt;] do_vfs_ioctl+0x98/0x550
[  176.266564]  [&lt;ffffffff810b8a0f&gt;] ? recalc_sigpending+0x1f/0x60
[  176.266564]  [&lt;ffffffff810b9127&gt;] ? __set_task_blocked+0x37/0x80
[  176.266564]  [&lt;ffffffff810ab95b&gt;] ? sys_wait4+0xab/0xf0
[  176.266564]  [&lt;ffffffff811e3d31&gt;] sys_ioctl+0x91/0xb0
[  176.266564]  [&lt;ffffffff810a95f0&gt;] ? task_stopped_code+0x50/0x50
[  176.266564]  [&lt;ffffffff81939199&gt;] system_call_fastpath+0x16/0x1b
[  176.266564] ---[ end trace 387af88219ad6143 ]---

It turns out that spin_unlock_bh(proc_inum_lock) is not safe when
put_pid is called with another spinlock held and irqs disabled.

For now take the easy path and use spin_lock_irqsave(proc_inum_lock)
in proc_free_inum and spin_loc_irq in proc_alloc_inum(proc_inum_lock).

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: do not try to write superblock on ro remount w/o journal</title>
<updated>2012-12-25T19:08:16+00:00</updated>
<author>
<name>Michael Tokarev</name>
<email>mjt@tls.msk.ru</email>
</author>
<published>2012-12-25T19:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d096ad0f79a782935d2e06ae8fb235e8c5397775'/>
<id>d096ad0f79a782935d2e06ae8fb235e8c5397775</id>
<content type='text'>
When a journal-less ext4 filesystem is mounted on a read-only block
device (blockdev --setro will do), each remount (for other, unrelated,
flags, like suid=&gt;nosuid etc) results in a series of scary messages
from kernel telling about I/O errors on the device.

This is becauese of the following code ext4_remount():

       if (sbi-&gt;s_journal == NULL)
                ext4_commit_super(sb, 1);

at the end of remount procedure, which forces writing (flushing) of
a superblock regardless whenever it is dirty or not, if the filesystem
is readonly or not, and whenever the device itself is readonly or not.

We only need call ext4_commit_super when the file system had been
previously mounted read/write.

Thanks to Eric Sandeen for help in diagnosing this issue.

Signed-off-By: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a journal-less ext4 filesystem is mounted on a read-only block
device (blockdev --setro will do), each remount (for other, unrelated,
flags, like suid=&gt;nosuid etc) results in a series of scary messages
from kernel telling about I/O errors on the device.

This is becauese of the following code ext4_remount():

       if (sbi-&gt;s_journal == NULL)
                ext4_commit_super(sb, 1);

at the end of remount procedure, which forces writing (flushing) of
a superblock regardless whenever it is dirty or not, if the filesystem
is readonly or not, and whenever the device itself is readonly or not.

We only need call ext4_commit_super when the file system had been
previously mounted read/write.

Thanks to Eric Sandeen for help in diagnosing this issue.

Signed-off-By: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: include journal blocks in df overhead calcs</title>
<updated>2012-12-25T18:56:01+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2012-12-25T18:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0875a2b448fcaba67010850cf9649293a5ef653d'/>
<id>0875a2b448fcaba67010850cf9649293a5ef653d</id>
<content type='text'>
To more accurately calculate overhead for "bsd" style
df reporting, we should count the journal blocks as
overhead as well.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Tested-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To more accurately calculate overhead for "bsd" style
df reporting, we should count the journal blocks as
overhead as well.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Tested-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
