<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs, branch v4.5-rc2</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>Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2016-01-31T23:49:06+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-31T23:49:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc799d0179baa7f62d2e73a8217a273ca82adbdf'/>
<id>dc799d0179baa7f62d2e73a8217a273ca82adbdf</id>
<content type='text'>
Pull timer fixes from Thomas Gleixner:
 "The timer departement delivers:

   - a regression fix for the NTP code along with a proper selftest
   - prevent a spurious timer interrupt in the NOHZ lowres code
   - a fix for user space interfaces returning the remaining time on
     architectures with CONFIG_TIME_LOW_RES=y
   - a few patches to fix COMPILE_TEST fallout"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick/nohz: Set the correct expiry when switching to nohz/lowres mode
  clocksource: Fix dependencies for archs w/o HAS_IOMEM
  clocksource: Select CLKSRC_MMIO where needed
  tick/sched: Hide unused oneshot timer code
  kselftests: timers: Add adjtimex SETOFFSET validity tests
  ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO
  itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper
  hrtimer: Handle remaining time proper for TIME_LOW_RES
  clockevents/tcb_clksrc: Prevent disabling an already disabled clock
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull timer fixes from Thomas Gleixner:
 "The timer departement delivers:

   - a regression fix for the NTP code along with a proper selftest
   - prevent a spurious timer interrupt in the NOHZ lowres code
   - a fix for user space interfaces returning the remaining time on
     architectures with CONFIG_TIME_LOW_RES=y
   - a few patches to fix COMPILE_TEST fallout"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick/nohz: Set the correct expiry when switching to nohz/lowres mode
  clocksource: Fix dependencies for archs w/o HAS_IOMEM
  clocksource: Select CLKSRC_MMIO where needed
  tick/sched: Hide unused oneshot timer code
  kselftests: timers: Add adjtimex SETOFFSET validity tests
  ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO
  itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper
  hrtimer: Handle remaining time proper for TIME_LOW_RES
  clockevents/tcb_clksrc: Prevent disabling an already disabled clock
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2016-01-29T23:46:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-29T23:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3f71ae711cebdeaff12989761f48bd4230e83d5'/>
<id>d3f71ae711cebdeaff12989761f48bd4230e83d5</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "Dave had a small collection of fixes to the new free space tree code,
  one of which was keeping our sysfs files more up to date with feature
  bits as different things get enabled (lzo, raid5/6, etc).

  I should have kept the sysfs stuff for rc3, since we always manage to
  trip over something.  This time it was GFP_KERNEL from somewhere that
  is NOFS only.  Instead of rebasing it out I've put a revert in, and
  we'll fix it properly for rc3.

  Otherwise, Filipe fixed a btrfs DIO race and Qu Wenruo fixed up a
  use-after-free in our tracepoints that Dave Jones reported"

* 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Revert "btrfs: synchronize incompat feature bits with sysfs files"
  btrfs: don't use GFP_HIGHMEM for free-space-tree bitmap kzalloc
  btrfs: sysfs: check initialization state before updating features
  Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"
  btrfs: async-thread: Fix a use-after-free error for trace
  Btrfs: fix race between fsync and lockless direct IO writes
  btrfs: add free space tree to the cow-only list
  btrfs: add free space tree to lockdep classes
  btrfs: tweak free space tree bitmap allocation
  btrfs: tests: switch to GFP_KERNEL
  btrfs: synchronize incompat feature bits with sysfs files
  btrfs: sysfs: introduce helper for syncing bits with sysfs files
  btrfs: sysfs: add free-space-tree bit attribute
  btrfs: sysfs: fix typo in compat_ro attribute definition
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull btrfs fixes from Chris Mason:
 "Dave had a small collection of fixes to the new free space tree code,
  one of which was keeping our sysfs files more up to date with feature
  bits as different things get enabled (lzo, raid5/6, etc).

  I should have kept the sysfs stuff for rc3, since we always manage to
  trip over something.  This time it was GFP_KERNEL from somewhere that
  is NOFS only.  Instead of rebasing it out I've put a revert in, and
  we'll fix it properly for rc3.

  Otherwise, Filipe fixed a btrfs DIO race and Qu Wenruo fixed up a
  use-after-free in our tracepoints that Dave Jones reported"

* 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Revert "btrfs: synchronize incompat feature bits with sysfs files"
  btrfs: don't use GFP_HIGHMEM for free-space-tree bitmap kzalloc
  btrfs: sysfs: check initialization state before updating features
  Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"
  btrfs: async-thread: Fix a use-after-free error for trace
  Btrfs: fix race between fsync and lockless direct IO writes
  btrfs: add free space tree to the cow-only list
  btrfs: add free space tree to lockdep classes
  btrfs: tweak free space tree bitmap allocation
  btrfs: tests: switch to GFP_KERNEL
  btrfs: synchronize incompat feature bits with sysfs files
  btrfs: sysfs: introduce helper for syncing bits with sysfs files
  btrfs: sysfs: add free-space-tree bit attribute
  btrfs: sysfs: fix typo in compat_ro attribute definition
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "btrfs: synchronize incompat feature bits with sysfs files"</title>
<updated>2016-01-29T16:19:37+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2016-01-29T16:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e410e34fad913dd568ec28d2a9949694324c14db'/>
<id>e410e34fad913dd568ec28d2a9949694324c14db</id>
<content type='text'>
This reverts commit 14e46e04958df740c6c6a94849f176159a333f13.

This ends up doing sysfs operations from deep in balance (where we
should be GFP_NOFS) and under heavy balance load, we're making races
against sysfs internals.

Revert it for now while we figure things out.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 14e46e04958df740c6c6a94849f176159a333f13.

This ends up doing sysfs operations from deep in balance (where we
should be GFP_NOFS) and under heavy balance load, we're making races
against sysfs internals.

Revert it for now while we figure things out.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: don't use GFP_HIGHMEM for free-space-tree bitmap kzalloc</title>
<updated>2016-01-27T15:05:49+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2016-01-27T14:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1c0ebad3f77387c6684f8b7e86a4bbaca7577ac'/>
<id>e1c0ebad3f77387c6684f8b7e86a4bbaca7577ac</id>
<content type='text'>
This was copied incorrectly from the __vmalloc call.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was copied incorrectly from the __vmalloc call.

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'dev/fst-followup' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5</title>
<updated>2016-01-27T13:48:23+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2016-01-27T13:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d32a4e34348869a273a01139112a13fc6870f003'/>
<id>d32a4e34348869a273a01139112a13fc6870f003</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: sysfs: check initialization state before updating features</title>
<updated>2016-01-27T13:40:10+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-01-27T13:06:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf6092066f80840410e3401cd962b23d54a95713'/>
<id>bf6092066f80840410e3401cd962b23d54a95713</id>
<content type='text'>
If the mount phase is not finished, we can't update the sysfs files.

Reported-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the mount phase is not finished, we can't update the sysfs files.

Reported-by: Chris Mason &lt;clm@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"</title>
<updated>2016-01-26T00:50:27+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-01-25T10:02:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80ad623edd2d0ccb47d85357ee31c97e6c684e82'/>
<id>80ad623edd2d0ccb47d85357ee31c97e6c684e82</id>
<content type='text'>
This reverts commit 696249132158014d594896df3a81390616069c5c. The
cleaner thread can block freezing when there's a snapshot cleaning in
progress and the other threads get suspended first. From the logs
provided by Martin we're waiting for reading extent pages:

kernel: PM: Syncing filesystems ... done.
kernel: Freezing user space processes ... (elapsed 0.015 seconds) done.
kernel: Freezing remaining freezable tasks ...
kernel: Freezing of tasks failed after 20.003 seconds (1 tasks refusing to freeze, wq_busy=0):
kernel: btrfs-cleaner   D ffff88033dd13bc0     0   152      2 0x00000000
kernel: ffff88032ebc2e00 ffff88032e750000 ffff88032e74fa50 7fffffffffffffff
kernel: ffffffff814a58df 0000000000000002 ffffea000934d580 ffffffff814a5451
kernel: 7fffffffffffffff ffffffff814a6e8f 0000000000000000 0000000000000020
kernel: Call Trace:
kernel: [&lt;ffffffff814a58df&gt;] ? bit_wait+0x2c/0x2c
kernel: [&lt;ffffffff814a5451&gt;] ? schedule+0x6f/0x7c
kernel: [&lt;ffffffff814a6e8f&gt;] ? schedule_timeout+0x2f/0xd8
kernel: [&lt;ffffffff81076f94&gt;] ? timekeeping_get_ns+0xa/0x2e
kernel: [&lt;ffffffff81077603&gt;] ? ktime_get+0x36/0x44
kernel: [&lt;ffffffff814a4f6c&gt;] ? io_schedule_timeout+0x94/0xf2
kernel: [&lt;ffffffff814a4f6c&gt;] ? io_schedule_timeout+0x94/0xf2
kernel: [&lt;ffffffff814a590b&gt;] ? bit_wait_io+0x2c/0x30
kernel: [&lt;ffffffff814a5694&gt;] ? __wait_on_bit+0x41/0x73
kernel: [&lt;ffffffff8109eba8&gt;] ? wait_on_page_bit+0x6d/0x72
kernel: [&lt;ffffffff8105d718&gt;] ? autoremove_wake_function+0x2a/0x2a
kernel: [&lt;ffffffff811a02d7&gt;] ? read_extent_buffer_pages+0x1bd/0x203
kernel: [&lt;ffffffff8117d9e9&gt;] ? free_root_pointers+0x4c/0x4c
kernel: [&lt;ffffffff8117e831&gt;] ? btree_read_extent_buffer_pages.constprop.57+0x5a/0xe9
kernel: [&lt;ffffffff8117f4f3&gt;] ? read_tree_block+0x2d/0x45
kernel: [&lt;ffffffff8116782a&gt;] ? read_block_for_search.isra.34+0x22a/0x26b
kernel: [&lt;ffffffff811656c3&gt;] ? btrfs_set_path_blocking+0x1e/0x4a
kernel: [&lt;ffffffff8116919b&gt;] ? btrfs_search_slot+0x648/0x736
kernel: [&lt;ffffffff81170559&gt;] ? btrfs_lookup_extent_info+0xb7/0x2c7
kernel: [&lt;ffffffff81170ee5&gt;] ? walk_down_proc+0x9c/0x1ae
kernel: [&lt;ffffffff81171c9d&gt;] ? walk_down_tree+0x40/0xa4
kernel: [&lt;ffffffff8117375f&gt;] ? btrfs_drop_snapshot+0x2da/0x664
kernel: [&lt;ffffffff8104ff21&gt;] ? finish_task_switch+0x126/0x167
kernel: [&lt;ffffffff811850f8&gt;] ? btrfs_clean_one_deleted_snapshot+0xa6/0xb0
kernel: [&lt;ffffffff8117eaba&gt;] ? cleaner_kthread+0x13e/0x17b
kernel: [&lt;ffffffff8117e97c&gt;] ? btrfs_item_end+0x33/0x33
kernel: [&lt;ffffffff8104d256&gt;] ? kthread+0x95/0x9d
kernel: [&lt;ffffffff8104d1c1&gt;] ? kthread_parkme+0x16/0x16
kernel: [&lt;ffffffff814a7b5f&gt;] ? ret_from_fork+0x3f/0x70
kernel: [&lt;ffffffff8104d1c1&gt;] ? kthread_parkme+0x16/0x16

As this affects a released kernel (4.4) we need a minimal fix for
stable kernels.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=108361
Reported-by: Martin Ziegler &lt;ziegler@uni-freiburg.de&gt;
CC: stable@vger.kernel.org # 4.4
CC: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 696249132158014d594896df3a81390616069c5c. The
cleaner thread can block freezing when there's a snapshot cleaning in
progress and the other threads get suspended first. From the logs
provided by Martin we're waiting for reading extent pages:

kernel: PM: Syncing filesystems ... done.
kernel: Freezing user space processes ... (elapsed 0.015 seconds) done.
kernel: Freezing remaining freezable tasks ...
kernel: Freezing of tasks failed after 20.003 seconds (1 tasks refusing to freeze, wq_busy=0):
kernel: btrfs-cleaner   D ffff88033dd13bc0     0   152      2 0x00000000
kernel: ffff88032ebc2e00 ffff88032e750000 ffff88032e74fa50 7fffffffffffffff
kernel: ffffffff814a58df 0000000000000002 ffffea000934d580 ffffffff814a5451
kernel: 7fffffffffffffff ffffffff814a6e8f 0000000000000000 0000000000000020
kernel: Call Trace:
kernel: [&lt;ffffffff814a58df&gt;] ? bit_wait+0x2c/0x2c
kernel: [&lt;ffffffff814a5451&gt;] ? schedule+0x6f/0x7c
kernel: [&lt;ffffffff814a6e8f&gt;] ? schedule_timeout+0x2f/0xd8
kernel: [&lt;ffffffff81076f94&gt;] ? timekeeping_get_ns+0xa/0x2e
kernel: [&lt;ffffffff81077603&gt;] ? ktime_get+0x36/0x44
kernel: [&lt;ffffffff814a4f6c&gt;] ? io_schedule_timeout+0x94/0xf2
kernel: [&lt;ffffffff814a4f6c&gt;] ? io_schedule_timeout+0x94/0xf2
kernel: [&lt;ffffffff814a590b&gt;] ? bit_wait_io+0x2c/0x30
kernel: [&lt;ffffffff814a5694&gt;] ? __wait_on_bit+0x41/0x73
kernel: [&lt;ffffffff8109eba8&gt;] ? wait_on_page_bit+0x6d/0x72
kernel: [&lt;ffffffff8105d718&gt;] ? autoremove_wake_function+0x2a/0x2a
kernel: [&lt;ffffffff811a02d7&gt;] ? read_extent_buffer_pages+0x1bd/0x203
kernel: [&lt;ffffffff8117d9e9&gt;] ? free_root_pointers+0x4c/0x4c
kernel: [&lt;ffffffff8117e831&gt;] ? btree_read_extent_buffer_pages.constprop.57+0x5a/0xe9
kernel: [&lt;ffffffff8117f4f3&gt;] ? read_tree_block+0x2d/0x45
kernel: [&lt;ffffffff8116782a&gt;] ? read_block_for_search.isra.34+0x22a/0x26b
kernel: [&lt;ffffffff811656c3&gt;] ? btrfs_set_path_blocking+0x1e/0x4a
kernel: [&lt;ffffffff8116919b&gt;] ? btrfs_search_slot+0x648/0x736
kernel: [&lt;ffffffff81170559&gt;] ? btrfs_lookup_extent_info+0xb7/0x2c7
kernel: [&lt;ffffffff81170ee5&gt;] ? walk_down_proc+0x9c/0x1ae
kernel: [&lt;ffffffff81171c9d&gt;] ? walk_down_tree+0x40/0xa4
kernel: [&lt;ffffffff8117375f&gt;] ? btrfs_drop_snapshot+0x2da/0x664
kernel: [&lt;ffffffff8104ff21&gt;] ? finish_task_switch+0x126/0x167
kernel: [&lt;ffffffff811850f8&gt;] ? btrfs_clean_one_deleted_snapshot+0xa6/0xb0
kernel: [&lt;ffffffff8117eaba&gt;] ? cleaner_kthread+0x13e/0x17b
kernel: [&lt;ffffffff8117e97c&gt;] ? btrfs_item_end+0x33/0x33
kernel: [&lt;ffffffff8104d256&gt;] ? kthread+0x95/0x9d
kernel: [&lt;ffffffff8104d1c1&gt;] ? kthread_parkme+0x16/0x16
kernel: [&lt;ffffffff814a7b5f&gt;] ? ret_from_fork+0x3f/0x70
kernel: [&lt;ffffffff8104d1c1&gt;] ? kthread_parkme+0x16/0x16

As this affects a released kernel (4.4) we need a minimal fix for
stable kernels.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=108361
Reported-by: Martin Ziegler &lt;ziegler@uni-freiburg.de&gt;
CC: stable@vger.kernel.org # 4.4
CC: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: async-thread: Fix a use-after-free error for trace</title>
<updated>2016-01-26T00:50:26+00:00</updated>
<author>
<name>Qu Wenruo</name>
<email>quwenruo@cn.fujitsu.com</email>
</author>
<published>2016-01-22T01:28:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a95b851370b84a4b9d92ee6d1fa0926901d0454'/>
<id>0a95b851370b84a4b9d92ee6d1fa0926901d0454</id>
<content type='text'>
Parameter of trace_btrfs_work_queued() can be freed in its workqueue.
So no one use use that pointer after queue_work().

Fix the user-after-free bug by move the trace line before queue_work().

Reported-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Signed-off-by: Qu Wenruo &lt;quwenruo@cn.fujitsu.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parameter of trace_btrfs_work_queued() can be freed in its workqueue.
So no one use use that pointer after queue_work().

Fix the user-after-free bug by move the trace line before queue_work().

Reported-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Signed-off-by: Qu Wenruo &lt;quwenruo@cn.fujitsu.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix race between fsync and lockless direct IO writes</title>
<updated>2016-01-26T00:50:26+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2016-01-21T10:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de0ee0edb21fbab4c7afa3e94573ecfebfb0244e'/>
<id>de0ee0edb21fbab4c7afa3e94573ecfebfb0244e</id>
<content type='text'>
An fsync, using the fast path, can race with a concurrent lockless direct
IO write and end up logging a file extent item that points to an extent
that wasn't written to yet. This is because the fast fsync path collects
ordered extents into a local list and then collects all the new extent
maps to log file extent items based on them, while the direct IO write
path creates the new extent map before it creates the corresponding
ordered extent (and submitting the respective bio(s)).

So fix this by making the direct IO write path create ordered extents
before the extent maps and make the fast fsync path collect any new
ordered extents after it collects the extent maps.
Note that making the fsync handler call inode_dio_wait() (after acquiring
the inode's i_mutex) would not work and lead to a deadlock when doing
AIO, as through AIO we end up in a path where the fsync handler is called
(through dio_aio_complete_work() -&gt; dio_complete() -&gt; vfs_fsync_range())
before the inode's dio counter is decremented (inode_dio_wait() waits
for this counter to have a value of zero).

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An fsync, using the fast path, can race with a concurrent lockless direct
IO write and end up logging a file extent item that points to an extent
that wasn't written to yet. This is because the fast fsync path collects
ordered extents into a local list and then collects all the new extent
maps to log file extent items based on them, while the direct IO write
path creates the new extent map before it creates the corresponding
ordered extent (and submitting the respective bio(s)).

So fix this by making the direct IO write path create ordered extents
before the extent maps and make the fast fsync path collect any new
ordered extents after it collects the extent maps.
Note that making the fsync handler call inode_dio_wait() (after acquiring
the inode's i_mutex) would not work and lead to a deadlock when doing
AIO, as through AIO we end up in a path where the fsync handler is called
(through dio_aio_complete_work() -&gt; dio_complete() -&gt; vfs_fsync_range())
before the inode's dio counter is decremented (inode_dio_wait() waits
for this counter to have a value of zero).

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix/fst-sysfs' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5</title>
<updated>2016-01-26T00:43:13+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2016-01-26T00:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6b5aa88c861cf0e4156e490009e2018d4fc81109'/>
<id>6b5aa88c861cf0e4156e490009e2018d4fc81109</id>
<content type='text'>
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
