<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/blkpg.h, branch v4.10.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.10.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.10.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-09-29T20:37:04Z</updated>
<entry>
<title>mtd: provide proper 32/64-bit compat_ioctl() support for BLKPG</title>
<updated>2015-09-29T20:37:04Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-09-21T20:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=53bb724f94f57b67213e08a4c155c8c5eb74c644'/>
<id>urn:sha1:53bb724f94f57b67213e08a4c155c8c5eb74c644</id>
<content type='text'>
After a bit of poking around wondering why my 32-bit user-space can't
seem to send a proper ioctl(BLKPG) to an MTD on my 64-bit kernel
(ARM64), I noticed that struct blkpg_ioctl_arg is actually pretty
unsuitable for use in the ioctl() ABI, due to its use of raw pointers,
and its lack of alignment/packing restrictions (32-bit arch'es tend to
pack the 4 fields into 4 32-bit words, whereas 64-bit arch'es would add
padding after the third int, and make this 6 32-bit words).

Anyway, this means BLKPG deserves some special compat_ioctl handling. Do
the conversion in a small shim for MTD.

block/compat_ioctl.c already has compat support for the block subsystem,
but it does so by a re-marshalling data to/from user-space (see
compat_blkpg_ioctl()). Personally, I think this approach is cleaner.

Tested only on MTD, with an ARM32 user space on an ARM64 kernel.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>UAPI: (Scripted) Disintegrate include/linux</title>
<updated>2012-10-13T09:46:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-10-13T09:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=607ca46e97a1b6594b29647d98a32d545c24bdff'/>
<id>urn:sha1:607ca46e97a1b6594b29647d98a32d545c24bdff</id>
<content type='text'>
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: add partition resize function to blkpg ioctl</title>
<updated>2012-08-01T10:24:18Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2012-08-01T10:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c83f6bf98dc1f1a194118b3830706cebbebda8c4'/>
<id>urn:sha1:c83f6bf98dc1f1a194118b3830706cebbebda8c4</id>
<content type='text'>
Add a new operation code (BLKPG_RESIZE_PARTITION) to the BLKPG ioctl that
allows altering the size of an existing partition, even if it is currently
in use.

This patch converts hd_struct-&gt;nr_sects into sequence counter because
One might extend a partition while IO is happening to it and update of
nr_sects can be non-atomic on 32bit machines with 64bit sector_t. This
can lead to issues like reading inconsistent size of a partition. Sequence
counter have been used so that readers don't have to take bdev mutex lock
as we call sector_in_part() very frequently.

Now all the access to hd_struct-&gt;nr_sects should happen using sequence
counter read/update helper functions part_nr_sects_read/part_nr_sects_write.
There is one exception though, set_capacity()/get_capacity(). I think
theoritically race should exist there too but this patch does not
modify set_capacity()/get_capacity() due to sheer number of call sites
and I am afraid that change might break something. I have left that as a
TODO item. We can handle it later if need be. This patch does not introduce
any new races as such w.r.t set_capacity()/get_capacity().

v2: Add CONFIG_LBDAF test to UP preempt case as suggested by Phillip.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Phillip Susi &lt;psusi@ubuntu.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>linux/blkpg.h needs &lt;linux/compiler.h&gt; for __user</title>
<updated>2006-04-27T15:46:56Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2006-04-27T15:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=acc429a517bd11fdcac9bea97d082d26231beb92'/>
<id>urn:sha1:acc429a517bd11fdcac9bea97d082d26231beb92</id>
<content type='text'>
Signed-off-by: David Woodhouse &lt;dwmw2@infradead.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sparse: trivial part of drivers/block __user annotation</title>
<updated>2004-05-29T04:13:21Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@www.linux.org.uk</email>
</author>
<published>2004-05-29T04:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e46f5c98d059345f5de04a4ec6b883da29a8f3b'/>
<id>urn:sha1:4e46f5c98d059345f5de04a4ec6b883da29a8f3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] remove partition_name()</title>
<updated>2003-05-07T15:17:47Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@digeo.com</email>
</author>
<published>2003-05-07T15:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=65faa449f2d83c822c4175af311bab3c78c90f2b'/>
<id>urn:sha1:65faa449f2d83c822c4175af311bab3c78c90f2b</id>
<content type='text'>
From: Christoph Hellwig &lt;hch@lst.de&gt;

partition_name() is a variant of __bdevname() that caches results and
returns a pointrer to kmalloc()ed data instead of printing into a buffer.
Due to it's caching it gets utterly confused when the name for a dev_t
changes (can happen easily now with device mapper and probably in the
future with dynamic dev_t users).

It's only used by the raid code and most calls are through a wrapper,
bdev_partition_name() which takes a struct block_device * that maybe be
NULL.

The patch below changes the bdev_partition_name() to call bdevname() if
possible and the other calls where we really have nothing more than a dev_t
to __bdevname.

Btw, it would be nice if someone who knows the md code a bit better than me
could remove bdev_partition_name() in favour of direct calls to bdevname()
where possible - that would also get rid of the returns pointer to string
on stack issue that this patch can't fix yet.
</content>
</entry>
<entry>
<title>[PATCH] block ioctl cleanup</title>
<updated>2002-10-15T11:25:13Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@math.psu.edu</email>
</author>
<published>2002-10-15T11:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6973580141ce5a4904436b29c0dc5f3d9982951'/>
<id>urn:sha1:c6973580141ce5a4904436b29c0dc5f3d9982951</id>
<content type='text'>
	guts of blkpg.c and blkdev_ioctl() sanitized up and moved into a new
file - drivers/block/ioctl.c.  blkpg.c is gone.
</content>
</entry>
<entry>
<title>[PATCH] removal of bogus exports</title>
<updated>2002-09-21T09:50:56Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@math.psu.edu</email>
</author>
<published>2002-09-21T09:50:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ceb1ee4c055c9a0debecf2b1759b70ce65abf27d'/>
<id>urn:sha1:ceb1ee4c055c9a0debecf2b1759b70ce65abf27d</id>
<content type='text'>
partition_name() moved from md.c to partitions/check.c; disk_name() is not
exported anymore; partition_name() takes dev_t instead of kdev_t.
</content>
</entry>
<entry>
<title>[PATCH] (2/3) more kdev_t removals</title>
<updated>2002-03-05T06:56:37Z</updated>
<author>
<name>Alexander Viro</name>
<email>viro@math.psu.edu</email>
</author>
<published>2002-03-05T06:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ebe5c28ef915a9eea6bee06881091ed2971b181e'/>
<id>urn:sha1:ebe5c28ef915a9eea6bee06881091ed2971b181e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Import changeset</title>
<updated>2002-02-05T01:40:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@athlon.transmeta.com</email>
</author>
<published>2002-02-05T01:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a2deb32924142696b8174cdf9b38cd72a11fc96'/>
<id>urn:sha1:7a2deb32924142696b8174cdf9b38cd72a11fc96</id>
<content type='text'>
</content>
</entry>
</feed>
