<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block/ioctl.c, branch v5.7</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=v5.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-03-25T15:50:08Z</updated>
<entry>
<title>block: move block layer internals out of include/linux/genhd.h</title>
<updated>2020-03-25T15:50:08Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-03-25T15:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=581e26004a09c50e5017caadc850ea17e374a5ee'/>
<id>urn:sha1:581e26004a09c50e5017caadc850ea17e374a5ee</id>
<content type='text'>
None of this needs to be exposed to drivers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>compat_ioctl: simplify up block/ioctl.c</title>
<updated>2020-01-03T08:42:52Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-11-29T10:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b81648cb5e3ae7296825f0c8d2f98e50631ee84'/>
<id>urn:sha1:9b81648cb5e3ae7296825f0c8d2f98e50631ee84</id>
<content type='text'>
Having separate implementations of blkdev_ioctl() often leads to these
getting out of sync, despite the comment at the top.

Since most of the ioctl commands are compatible, and we try very hard
not to add any new incompatible ones, move all the common bits into a
shared function and leave only the ones that are historically different
in separate functions for native/compat mode.

To deal with the compat_ptr() conversion, pass both the integer
argument and the pointer argument into the new blkdev_common_ioctl()
and make sure to always use the correct one of these.

blkdev_ioctl() is now only kept as a separate exported interfact
for drivers/char/raw.c, which lacks a compat_ioctl variant.
We should probably either move raw.c to staging if there are no
more users, or export blkdev_compat_ioctl() as well.

Reviewed-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>compat_ioctl: block: simplify compat_blkpg_ioctl()</title>
<updated>2020-01-03T08:42:52Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-11-28T10:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5fb889f587fa2ae486e067d8a00df955ae6492b3'/>
<id>urn:sha1:5fb889f587fa2ae486e067d8a00df955ae6492b3</id>
<content type='text'>
There is no need to go through a compat_alloc_user_space()
copy any more, just wrap the function in a small helper that
works the same way for native and compat mode.

Reviewed-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c</title>
<updated>2020-01-03T08:42:52Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-11-29T10:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdc1ddad3e5f385698df150a0cfaaac62b491e7e'/>
<id>urn:sha1:bdc1ddad3e5f385698df150a0cfaaac62b491e7e</id>
<content type='text'>
Having both in the same file allows a number of simplifications
to the compat path, and makes it more likely that changes to
the native path get applied to the compat version as well.

Reviewed-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>compat_ioctl: block: add blkdev_compat_ptr_ioctl</title>
<updated>2020-01-03T08:32:59Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-11-28T14:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee6a129dffe10ae30b45b5a744e7c0a056291d13'/>
<id>urn:sha1:ee6a129dffe10ae30b45b5a744e7c0a056291d13</id>
<content type='text'>
A lot of block drivers need only a trivial .compat_ioctl callback.

Add a helper function that can be set as the callback pointer
to only convert the argument using the compat_ptr() conversion
and otherwise assume all input and output data is compatible,
or handled using in_compat_syscall() checks.

This mirrors the compat_ptr_ioctl() helper function used in
character devices.

Reviewed-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>block: simplify blkdev_nr_zones</title>
<updated>2019-12-03T15:51:24Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-12-03T09:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b38bb4b1e6de47b379afaad2c707df639bb4dc7'/>
<id>urn:sha1:9b38bb4b1e6de47b379afaad2c707df639bb4dc7</id>
<content type='text'>
Simplify the arguments to blkdev_nr_zones by passing a gendisk instead
of the block_device and capacity.  This also removes the need for
__blkdev_nr_zones as all callers are outside the fast path and can
deal with the additional branch.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: remove (__)blkdev_reread_part as an exported API</title>
<updated>2019-11-14T14:43:59Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-11-14T14:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0b870df80bc70dad432fd0c142bb709a49964f5'/>
<id>urn:sha1:f0b870df80bc70dad432fd0c142bb709a49964f5</id>
<content type='text'>
In general drivers should never mess with partition tables directly.
Unfortunately s390 and loop do for somewhat historic reasons, but they
can use bdev_disk_changed directly instead when we export it as they
satisfy the sanity checks we have in __blkdev_reread_part.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;	[dasd]
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: fix bdev_disk_changed for non-partitioned devices</title>
<updated>2019-11-14T14:43:53Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-11-14T14:34:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=142fe8f4bb169e8632024d51c64653a8bf140561'/>
<id>urn:sha1:142fe8f4bb169e8632024d51c64653a8bf140561</id>
<content type='text'>
We still have to set the capacity to 0 if invalidating or call
revalidate_disk if not even if the disk has no partitions.  Fix
that by merging rescan_partitions into bdev_disk_changed and just
stubbing out blk_add_partitions and blk_drop_partitions for
non-partitioned devices.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: merge invalidate_partitions into rescan_partitions</title>
<updated>2019-11-14T14:42:41Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-11-14T14:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6917d0689993f46d97d40dd66c601d0fd5b1dbdd'/>
<id>urn:sha1:6917d0689993f46d97d40dd66c601d0fd5b1dbdd</id>
<content type='text'>
A lot of the logic in invalidate_partitions and rescan_partitions is
shared.  Merge the two functions to simplify things.  There is a small
behavior change in that we now send the kevent change notice also if we
were not invalidating but no partitions were found, which seems like
the right thing to do.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: add zone open, close and finish ioctl support</title>
<updated>2019-11-07T13:31:50Z</updated>
<author>
<name>Ajay Joshi</name>
<email>ajay.joshi@wdc.com</email>
</author>
<published>2019-10-27T14:05:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e876df1fe0ad1b191284ee6ed2db7960bd322d00'/>
<id>urn:sha1:e876df1fe0ad1b191284ee6ed2db7960bd322d00</id>
<content type='text'>
Introduce three new ioctl commands BLKOPENZONE, BLKCLOSEZONE and
BLKFINISHZONE to allow applications to control the condition of zones
on a zoned block device through the execution of the REQ_OP_ZONE_OPEN,
REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH operations.

Contains contributions from Matias Bjorling, Hans Holmberg,
Dmitry Fomichev, Keith Busch, Damien Le Moal and Christoph Hellwig.

Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ajay Joshi &lt;ajay.joshi@wdc.com&gt;
Signed-off-by: Matias Bjorling &lt;matias.bjorling@wdc.com&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@wdc.com&gt;
Signed-off-by: Dmitry Fomichev &lt;dmitry.fomichev@wdc.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
