<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block, branch v4.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-04-28T08:07:43Z</updated>
<entry>
<title>rbd: report unsupported features to syslog</title>
<updated>2016-04-28T08:07:43Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2016-04-13T12:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3767f0faeda5abdf205f947ae912d48dc70fa06'/>
<id>urn:sha1:d3767f0faeda5abdf205f947ae912d48dc70fa06</id>
<content type='text'>
... instead of just returning an error.

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Josh Durgin &lt;jdurgin@redhat.com&gt;
</content>
</entry>
<entry>
<title>rbd: fix rbd map vs notify races</title>
<updated>2016-04-28T08:07:22Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2016-04-15T14:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=811c6688774613a78bfa020f64b570b73f6974c8'/>
<id>urn:sha1:811c6688774613a78bfa020f64b570b73f6974c8</id>
<content type='text'>
A while ago, commit 9875201e1049 ("rbd: fix use-after free of
rbd_dev-&gt;disk") fixed rbd unmap vs notify race by introducing
an exported wrapper for flushing notifies and sticking it into
do_rbd_remove().

A similar problem exists on the rbd map path, though: the watch is
registered in rbd_dev_image_probe(), while the disk is set up quite
a few steps later, in rbd_dev_device_setup().  Nothing prevents
a notify from coming in and crashing on a NULL rbd_dev-&gt;disk:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
    Call Trace:
     [&lt;ffffffffa0508344&gt;] rbd_watch_cb+0x34/0x180 [rbd]
     [&lt;ffffffffa04bd290&gt;] do_event_work+0x40/0xb0 [libceph]
     [&lt;ffffffff8109d5db&gt;] process_one_work+0x17b/0x470
     [&lt;ffffffff8109e3ab&gt;] worker_thread+0x11b/0x400
     [&lt;ffffffff8109e290&gt;] ? rescuer_thread+0x400/0x400
     [&lt;ffffffff810a5acf&gt;] kthread+0xcf/0xe0
     [&lt;ffffffff810b41b3&gt;] ? finish_task_switch+0x53/0x170
     [&lt;ffffffff810a5a00&gt;] ? kthread_create_on_node+0x140/0x140
     [&lt;ffffffff81645dd8&gt;] ret_from_fork+0x58/0x90
     [&lt;ffffffff810a5a00&gt;] ? kthread_create_on_node+0x140/0x140
    RIP  [&lt;ffffffffa050828a&gt;] rbd_dev_refresh+0xfa/0x180 [rbd]

If an error occurs during rbd map, we have to error out, potentially
tearing down a watch.  Just like on rbd unmap, notifies have to be
flushed, otherwise rbd_watch_cb() may end up trying to read in the
image header after rbd_dev_image_release() has run:

    Assertion failure in rbd_dev_header_info() at line 4722:

     rbd_assert(rbd_image_format_valid(rbd_dev-&gt;image_format));

    Call Trace:
     [&lt;ffffffff81cccee0&gt;] ? rbd_parent_request_create+0x150/0x150
     [&lt;ffffffff81cd4e59&gt;] rbd_dev_refresh+0x59/0x390
     [&lt;ffffffff81cd5229&gt;] rbd_watch_cb+0x69/0x290
     [&lt;ffffffff81fde9bf&gt;] do_event_work+0x10f/0x1c0
     [&lt;ffffffff81107799&gt;] process_one_work+0x689/0x1a80
     [&lt;ffffffff811076f7&gt;] ? process_one_work+0x5e7/0x1a80
     [&lt;ffffffff81132065&gt;] ? finish_task_switch+0x225/0x640
     [&lt;ffffffff81107110&gt;] ? pwq_dec_nr_in_flight+0x2b0/0x2b0
     [&lt;ffffffff81108c69&gt;] worker_thread+0xd9/0x1320
     [&lt;ffffffff81108b90&gt;] ? process_one_work+0x1a80/0x1a80
     [&lt;ffffffff8111b02d&gt;] kthread+0x21d/0x2e0
     [&lt;ffffffff8111ae10&gt;] ? kthread_stop+0x550/0x550
     [&lt;ffffffff82022802&gt;] ret_from_fork+0x22/0x40
     [&lt;ffffffff8111ae10&gt;] ? kthread_stop+0x550/0x550
    RIP  [&lt;ffffffff81ccd8f9&gt;] rbd_dev_header_info+0xa19/0x1e30

To fix this, a) check if RBD_DEV_FLAG_EXISTS is set before calling
revalidate_disk(), b) move ceph_osdc_flush_notifies() call into
rbd_dev_header_unwatch_sync() to cover rbd map error paths and c) turn
header read-in into a critical section.  The latter also happens to
take care of rbd map foo@bar vs rbd snap rm foo@bar race.

Fixes: http://tracker.ceph.com/issues/15490

Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Josh Durgin &lt;jdurgin@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2016-04-15T22:44:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-15T22:44:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e572599139d27db3aaf540b0d34f0a4f58dfca1'/>
<id>urn:sha1:2e572599139d27db3aaf540b0d34f0a4f58dfca1</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A few fixes for the current series. This contains:

   - Two fixes for NVMe:

     One fixes a reset race that can be triggered by repeated
     insert/removal of the module.

     The other fixes an issue on some platforms, where we get probe
     timeouts since legacy interrupts isn't working.  This used not to
     be a problem since we had the worker thread poll for completions,
     but since that was killed off, it means those poor souls can't
     successfully probe their NVMe device.  Use a proper IRQ check and
     probe (msi-x -&gt; msi -&gt;legacy), like most other drivers to work
     around this.  Both from Keith.

   - A loop corruption issue with offset in iters, from Ming Lei.

   - A fix for not having the partition stat per cpu ref count
     initialized before sending out the KOBJ_ADD, which could cause user
     space to access the counter prior to initialization.  Also from
     Ming Lei.

   - A fix for using the wrong congestion state, from Kaixu Xia"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: loop: fix filesystem corruption in case of aio/dio
  NVMe: Always use MSI/MSI-x interrupts
  NVMe: Fix reset/remove race
  writeback: fix the wrong congested state variable definition
  block: partition: initialize percpuref before sending out KOBJ_ADD
</content>
</entry>
<entry>
<title>block: loop: fix filesystem corruption in case of aio/dio</title>
<updated>2016-04-15T14:25:56Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2016-04-15T10:51:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7297a6a3a3322b054592e8e988981d2f5f29cc4'/>
<id>urn:sha1:a7297a6a3a3322b054592e8e988981d2f5f29cc4</id>
<content type='text'>
Starting from commit e36f620428(block: split bios to max possible length),
block core starts to split bio in the middle of bvec.

Unfortunately loop dio/aio doesn't consider this situation, and
always treat 'iter.iov_offset' as zero. Then filesystem corruption
is observed.

This patch figures out the offset of the base bvevc via
'bio-&gt;bi_iter.bi_bvec_done' and fixes the issue by passing the offset
to iov iterator.

Fixes: e36f6204288088f (block: split bios to max possible length)
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: stable@vger.kernel.org (4.5)
Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client</title>
<updated>2016-04-07T23:34:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-07T23:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c915b3ac4ecf6ff67573eed24458d862e842cb6'/>
<id>urn:sha1:1c915b3ac4ecf6ff67573eed24458d862e842cb6</id>
<content type='text'>
Pull Ceph fix from Sage Weil:
 "This just fixes a few remaining memory allocations in RBD to use
  GFP_NOIO instead of GFP_ATOMIC"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: use GFP_NOIO consistently for request allocations
</content>
</entry>
<entry>
<title>rbd: use GFP_NOIO consistently for request allocations</title>
<updated>2016-04-05T20:11:37Z</updated>
<author>
<name>David Disseldorp</name>
<email>ddiss@suse.de</email>
</author>
<published>2016-04-05T09:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2224d879c7c0f85c14183ef82eb48bd875ceb599'/>
<id>urn:sha1:2224d879c7c0f85c14183ef82eb48bd875ceb599</id>
<content type='text'>
As of 5a60e87603c4c533492c515b7f62578189b03c9c, RBD object request
allocations are made via rbd_obj_request_create() with GFP_NOIO.
However, subsequent OSD request allocations in rbd_osd_req_create*()
use GFP_ATOMIC.

With heavy page cache usage (e.g. OSDs running on same host as krbd
client), rbd_osd_req_create() order-1 GFP_ATOMIC allocations have been
observed to fail, where direct reclaim would have allowed GFP_NOIO
allocations to succeed.

Cc: stable@vger.kernel.org # 3.18+
Suggested-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Suggested-by: Neil Brown &lt;neilb@suse.com&gt;
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage</title>
<updated>2016-04-04T17:41:08Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2016-04-01T12:29:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea1754a084760e68886f5b725c8eaada9cc57155'/>
<id>urn:sha1:ea1754a084760e68886f5b725c8eaada9cc57155</id>
<content type='text'>
Mostly direct substitution with occasional adjustment or removing
outdated comments.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros</title>
<updated>2016-04-04T17:41:08Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2016-04-01T12:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a'/>
<id>urn:sha1:09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a</id>
<content type='text'>
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client</title>
<updated>2016-03-26T22:53:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-26T22:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5a38f6e4668b3110a66cd96ce2096184bf66def'/>
<id>urn:sha1:d5a38f6e4668b3110a66cd96ce2096184bf66def</id>
<content type='text'>
Pull Ceph updates from Sage Weil:
 "There is quite a bit here, including some overdue refactoring and
  cleanup on the mon_client and osd_client code from Ilya, scattered
  writeback support for CephFS and a pile of bug fixes from Zheng, and a
  few random cleanups and fixes from others"

[ I already decided not to pull this because of it having been rebased
  recently, but ended up changing my mind after all.  Next time I'll
  really hold people to it.  Oh well.   - Linus ]

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (34 commits)
  libceph: use KMEM_CACHE macro
  ceph: use kmem_cache_zalloc
  rbd: use KMEM_CACHE macro
  ceph: use lookup request to revalidate dentry
  ceph: kill ceph_get_dentry_parent_inode()
  ceph: fix security xattr deadlock
  ceph: don't request vxattrs from MDS
  ceph: fix mounting same fs multiple times
  ceph: remove unnecessary NULL check
  ceph: avoid updating directory inode's i_size accidentally
  ceph: fix race during filling readdir cache
  libceph: use sizeof_footer() more
  ceph: kill ceph_empty_snapc
  ceph: fix a wrong comparison
  ceph: replace CURRENT_TIME by current_fs_time()
  ceph: scattered page writeback
  libceph: add helper that duplicates last extent operation
  libceph: enable large, variable-sized OSD requests
  libceph: osdc-&gt;req_mempool should be backed by a slab pool
  libceph: make r_request msg_size calculation clearer
  ...
</content>
</entry>
<entry>
<title>rbd: use KMEM_CACHE macro</title>
<updated>2016-03-25T17:51:56Z</updated>
<author>
<name>Geliang Tang</name>
<email>geliangtang@163.com</email>
</author>
<published>2016-03-13T07:17:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03d9440676163e965cb77d03c102b461d8ccb482'/>
<id>urn:sha1:03d9440676163e965cb77d03c102b461d8ccb482</id>
<content type='text'>
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code.

Signed-off-by: Geliang Tang &lt;geliangtang@163.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
</feed>
