<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block/ioctl.c, branch v4.5</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.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-01-30T21:35:31Z</updated>
<entry>
<title>block: revert runtime dax control of the raw block device</title>
<updated>2016-01-30T21:35:31Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-01-29T04:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f4736fe7ca804aa79b5916221bb13dfc6221a0f'/>
<id>urn:sha1:9f4736fe7ca804aa79b5916221bb13dfc6221a0f</id>
<content type='text'>
Dynamically enabling DAX requires that the page cache first be flushed
and invalidated.  This must occur atomically with the change of DAX mode
otherwise we confuse the fsync/msync tracking and violate data
durability guarantees.  Eliminate the possibilty of DAX-disabled to
DAX-enabled transitions for now and revisit this for the next cycle.

Cc: Jan Kara &lt;jack@suse.com&gt;
Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>wrappers for -&gt;i_mutex access</title>
<updated>2016-01-22T23:04:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-01-22T20:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5955102c9984fa081b2d570cfac75c97eecf8f3b'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>pmem, dax: disable dax in the presence of bad blocks</title>
<updated>2016-01-10T06:42:31Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-01-06T20:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57f7f317abdd07954cb116280c88d18378afb33e'/>
<id>urn:sha1:57f7f317abdd07954cb116280c88d18378afb33e</id>
<content type='text'>
Longer term teach dax to punch "error" holes in mapping requests and
deliver SIGBUS to applications that consume a bad pmem page.  For now,
simply disable the dax performance optimization in the presence of known
errors.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>block: enable dax for raw block devices</title>
<updated>2016-01-09T14:30:49Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2015-11-30T18:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a023cdba50c5f5f2bc351783b3131699deb3937'/>
<id>urn:sha1:5a023cdba50c5f5f2bc351783b3131699deb3937</id>
<content type='text'>
If an application wants exclusive access to all of the persistent memory
provided by an NVDIMM namespace it can use this raw-block-dax facility
to forgo establishing a filesystem.  This capability is targeted
primarily to hypervisors wanting to provision persistent memory for
guests.  It can be disabled / enabled dynamically via the new BLKDAXSET
ioctl.

Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;</content>
</entry>
<entry>
<title>block: add an API for Persistent Reservations</title>
<updated>2015-10-21T20:46:56Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-10-15T12:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bbd3e064362e5057cc4799ba2e4d68c7593e490b'/>
<id>urn:sha1:bbd3e064362e5057cc4799ba2e4d68c7593e490b</id>
<content type='text'>
This commits adds a driver API and ioctls for controlling Persistent
Reservations s/genericly/generically/ at the block layer.  Persistent
Reservations are supported by SCSI and NVMe and allow controlling who gets
access to a device in a shared storage setup.

Note that we add a pr_ops structure to struct block_device_operations
instead of adding the members directly to avoid bloating all instances
of devices that will never support Persistent Reservations.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: cleanup blkdev_ioctl</title>
<updated>2015-10-21T20:46:55Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-10-15T12:10:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d8e4bb8103df02a2c509868732dc93fb66110a12'/>
<id>urn:sha1:d8e4bb8103df02a2c509868732dc93fb66110a12</id>
<content type='text'>
Split out helpers for all non-trivial ioctls to make this function simpler,
and also start passing around a pointer version of the argument, as that's
what most ioctl handlers actually need.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: replace trylock with mutex_lock in blkdev_reread_part()</title>
<updated>2015-05-20T15:05:45Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2015-05-06T04:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b04a5636a665f5529fdf69ee7e5512156196f31c'/>
<id>urn:sha1:b04a5636a665f5529fdf69ee7e5512156196f31c</id>
<content type='text'>
The only possible problem of using mutex_lock() instead of trylock
is about deadlock.

If there aren't any locks held before calling blkdev_reread_part(),
deadlock can't be caused by this conversion.

If there are locks held before calling blkdev_reread_part(),
and if these locks arn't required in open, close handler and I/O
path, deadlock shouldn't be caused too.

Both user space's ioctl(BLKRRPART) and md_setup_drive() from
init/do_mounts_md.c belongs to the 1st case, so the conversion is safe
for the two cases.

For loop, the previous patches in this pathset has fixed the ABBA lock
dependency, so the conversion is OK.

For nbd, tx_lock is held when calling the function:

	- both open and release won't hold the lock
	- when blkdev_reread_part() is run, I/O thread has been stopped
	already, so tx_lock won't be acquired in I/O path at that time.
	- so the conversion won't cause deadlock for nbd

For dasd, both dasd_open(), dasd_release() and request function don't
acquire any mutex/semphone, so the conversion should be safe.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Acked-by: Jarod Wilson &lt;jarod@redhat.com&gt;
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>block: export blkdev_reread_part() and __blkdev_reread_part()</title>
<updated>2015-05-20T15:05:42Z</updated>
<author>
<name>Jarod Wilson</name>
<email>jarod@redhat.com</email>
</author>
<published>2015-05-06T04:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be32417796c2b8a83fe4cbece83bea96ab9e378f'/>
<id>urn:sha1:be32417796c2b8a83fe4cbece83bea96ab9e378f</id>
<content type='text'>
This patch exports blkdev_reread_part() for block drivers, also
introduce __blkdev_reread_part().

For some drivers, such as loop, reread of partitions can be run
from the release path, and bd_mutex may already be held prior to
calling ioctl_by_bdev(bdev, BLKRRPART, 0), so introduce
__blkdev_reread_part for use in such cases.

CC: Christoph Hellwig &lt;hch@lst.de&gt;
CC: Jens Axboe &lt;axboe@kernel.dk&gt;
CC: Tejun Heo &lt;tj@kernel.org&gt;
CC: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
CC: Markus Pargmann &lt;mpa@pengutronix.de&gt;
CC: Stefan Weinhuber &lt;wein@de.ibm.com&gt;
CC: Stefan Haberland &lt;stefan.haberland@de.ibm.com&gt;
CC: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
CC: Fabian Frederick &lt;fabf@skynet.be&gt;
CC: Ming Lei &lt;ming.lei@canonical.com&gt;
CC: David Herrmann &lt;dh.herrmann@gmail.com&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: nbd-general@lists.sourceforge.net
CC: linux-s390@vger.kernel.org
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jarod Wilson &lt;jarod@redhat.com&gt;
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>block: Add discard flag to blkdev_issue_zeroout() function</title>
<updated>2015-01-21T17:41:46Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2015-01-21T01:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d93ba7a5a97c9f315bacdcdb8de4e5f368e7b396'/>
<id>urn:sha1:d93ba7a5a97c9f315bacdcdb8de4e5f368e7b396</id>
<content type='text'>
blkdev_issue_discard() will zero a given block range. This is done by
way of explicit writing, thus provisioning or allocating the blocks on
disk.

There are use cases where the desired behavior is to zero the blocks but
unprovision them if possible. The blocks must deterministically contain
zeroes when they are subsequently read back.

This patch adds a flag to blkdev_issue_zeroout() that provides this
variant. If the discard flag is set and a block device guarantees
discard_zeroes_data we will use REQ_DISCARD to clear the block range. If
the device does not support discard_zeroes_data or if the discard
request fails we will fall back to first REQ_WRITE_SAME and then a
regular REQ_WRITE.

Also update the callers of blkdev_issue_zero() to reflect the new flag
and make sb_issue_zeroout() prefer the discard approach.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block, bdi: an active gendisk always has a request_queue associated with it</title>
<updated>2014-09-08T16:00:35Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2014-09-07T23:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff9ea323816dc1c8ac7144afd4eab3ac97704430'/>
<id>urn:sha1:ff9ea323816dc1c8ac7144afd4eab3ac97704430</id>
<content type='text'>
bdev_get_queue() returns the request_queue associated with the
specified block_device.  blk_get_backing_dev_info() makes use of
bdev_get_queue() to determine the associated bdi given a block_device.

All the callers of bdev_get_queue() including
blk_get_backing_dev_info() assume that bdev_get_queue() may return
NULL and implement NULL handling; however, bdev_get_queue() requires
the passed in block_device is opened and attached to its gendisk.
Because an active gendisk always has a valid request_queue associated
with it, bdev_get_queue() can never return NULL and neither can
blk_get_backing_dev_info().

Make it clear that neither of the two functions can return NULL and
remove NULL handling from all the callers.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Chris Mason &lt;clm@fb.com&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
