<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/loop.c, branch v3.3-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block/loop.c?h=v3.3-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block/loop.c?h=v3.3-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-04T03:54:07Z</updated>
<entry>
<title>fs: move code out of buffer.c</title>
<updated>2012-01-04T03:54:07Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-09-16T06:31:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff01bb4832651c6d25ac509a06a10fcbd75c461c'/>
<id>urn:sha1:ff01bb4832651c6d25ac509a06a10fcbd75c461c</id>
<content type='text'>
Move invalidate_bdev, block_sync_page into fs/block_dev.c.  Export
kill_bdev as well, so brd doesn't have to open code it.  Reduce
buffer_head.h requirement accordingly.

Removed a rather large comment from invalidate_bdev, as it looked a bit
obsolete to bother moving.  The small comment replacing it says enough.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>loop: Fix discard_alignment default setting</title>
<updated>2011-12-02T13:47:03Z</updated>
<author>
<name>Lukas Czerner</name>
<email>lczerner@redhat.com</email>
</author>
<published>2011-12-02T13:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dfaf3c036cd46a73f4ef3e4b75c1f647e503d4e1'/>
<id>urn:sha1:dfaf3c036cd46a73f4ef3e4b75c1f647e503d4e1</id>
<content type='text'>
discard_alignment is not relevant to the loop driver since it is
supposed to be set as a workaround for the old sector 63 alignments.
So set it to zero rather than block size.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Reported-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>loop: fix loop block driver discard and encryption comment</title>
<updated>2011-11-25T08:41:25Z</updated>
<author>
<name>Dave Young</name>
<email>dyoung@redhat.com</email>
</author>
<published>2011-11-25T08:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae95757a9065d89be7c1ca613b53163dd30858b7'/>
<id>urn:sha1:ae95757a9065d89be7c1ca613b53163dd30858b7</id>
<content type='text'>
The loop driver does not support discard if encryption is enabled,
fix the comment.

Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>loop: cleanup set_status interface</title>
<updated>2011-11-16T08:21:49Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2011-11-16T08:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7035b5df3c071ccaf2f1694b96bd8958b0eb37ca'/>
<id>urn:sha1:7035b5df3c071ccaf2f1694b96bd8958b0eb37ca</id>
<content type='text'>
1) Anyone who has read access to loopdev has permission to call set_status
   and may change important parameters such as lo_offset, lo_sizelimit and
   so on, which contradicts to read access pattern and definitely equals
   to write access pattern.
2) Add lo_offset over i_size check to prevent blkdev_size overflow.
   ##Testcase_bagin
   #dd if=/dev/zero of=./file bs=1k count=1
   #losetup /dev/loop0 ./file
   /* userspace_application */
   struct loop_info64 loinf;
   fd = open("/dev/loop0", O_RDONLY);
   ioctl(fd, LOOP_GET_STATUS64, &amp;loinf);
   /* Set offset to any value which is bigger than i_size, and sizelimit
    * to nonzero value*/
   loinf.lo_offset = 4096*1024;
   loinf.lo_sizelimit = 1024;
   ioctl(fd, LOOP_SET_STATUS64, &amp;loinf);
   /* After this loop device will have size similar to 0x7fffffffffxxxx */
   #blockdev --getsz /dev/loop0
   ##OUTPUT: 36028797018955968
   ##Testcase_end

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>loop: prevent information leak after failed read</title>
<updated>2011-11-16T08:21:48Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2011-11-16T08:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3bb9068278ea524581237abadd41377a14717e7d'/>
<id>urn:sha1:3bb9068278ea524581237abadd41377a14717e7d</id>
<content type='text'>
If read was not fully successful we have to fail whole bio to prevent
information leak of old pages

##Testcase_begin
dd if=/dev/zero of=./file bs=1M count=1
losetup /dev/loop0 ./file -o 4096
truncate -s 0 ./file
# OOps loop offset is now beyond i_size, so read will silently fail.
# So bio's pages would not be cleared, may which result in information leak.
hexdump -C /dev/loop0
##testcase_end

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.2/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2011-11-05T00:22:14Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-05T00:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d0a8d10cfb4cc3d1877c29a866ee7d8a46aa2fa'/>
<id>urn:sha1:3d0a8d10cfb4cc3d1877c29a866ee7d8a46aa2fa</id>
<content type='text'>
* 'for-3.2/drivers' of git://git.kernel.dk/linux-block: (30 commits)
  virtio-blk: use ida to allocate disk index
  hpsa: add small delay when using PCI Power Management to reset for kump
  cciss: add small delay when using PCI Power Management to reset for kump
  xen/blkback: Fix two races in the handling of barrier requests.
  xen/blkback: Check for proper operation.
  xen/blkback: Fix the inhibition to map pages when discarding sector ranges.
  xen/blkback: Report VBD_WSECT (wr_sect) properly.
  xen/blkback: Support 'feature-barrier' aka old-style BARRIER requests.
  xen-blkfront: plug device number leak in xlblk_init() error path
  xen-blkfront: If no barrier or flush is supported, use invalid operation.
  xen-blkback: use kzalloc() in favor of kmalloc()+memset()
  xen-blkback: fixed indentation and comments
  xen-blkfront: fix a deadlock while handling discard response
  xen-blkfront: Handle discard requests.
  xen-blkback: Implement discard requests ('feature-discard')
  xen-blkfront: add BLKIF_OP_DISCARD and discard request struct
  drivers/block/loop.c: remove unnecessary bdev argument from loop_clr_fd()
  drivers/block/loop.c: emit uevent on auto release
  drivers/block/cpqarray.c: use pci_dev-&gt;revision
  loop: always allow userspace partitions and optionally support automatic scanning
  ...

Fic up trivial header file includsion conflict in drivers/block/loop.c
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-3.2/core</title>
<updated>2011-10-24T14:24:38Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2011-10-24T14:24:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83157223defe3be490cfea048e83451b6f254216'/>
<id>urn:sha1:83157223defe3be490cfea048e83451b6f254216</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'v3.1-rc10' into for-3.2/core</title>
<updated>2011-10-19T12:30:42Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2011-10-19T12:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c04b426f2e8b46cfc7969a35b2631063a3c646c'/>
<id>urn:sha1:5c04b426f2e8b46cfc7969a35b2631063a3c646c</id>
<content type='text'>
Conflicts:
	block/blk-core.c
	include/linux/blkdev.h

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>loop: remove the incorrect write_begin/write_end shortcut</title>
<updated>2011-10-17T10:57:20Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-10-17T10:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=456be1484ffc72a24bdb4200b5847c4fa90139d9'/>
<id>urn:sha1:456be1484ffc72a24bdb4200b5847c4fa90139d9</id>
<content type='text'>
Currently the loop device tries to call directly into write_begin/write_end
instead of going through -&gt;write if it can.  This is a fairly nasty shortcut
as write_begin and write_end are only callbacks for the generic write code
and expect to be called with filesystem specific locks held.

This code currently causes various issues for clustered filesystems as it
doesn't take the required cluster locks, and it also causes issues for XFS
as it doesn't properly lock against the swapext ioctl as called by the
defragmentation tools.  This in case causes data corruption if
defragmentation hits a busy loop device in the wrong time window, as
reported by RH QA.

The reason why we have this shortcut is that it saves a data copy when
doing a transformation on the loop device, which is the technical term
for using cryptoloop (or an XOR transformation).  Given that cryptoloop
has been deprecated in favour of dm-crypt my opinion is that we should
simply drop this shortcut instead of finding complicated ways to to
introduce a formal interface for this shortcut.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>drivers/block/loop.c: remove unnecessary bdev argument from loop_clr_fd()</title>
<updated>2011-09-21T08:02:13Z</updated>
<author>
<name>Ayan George</name>
<email>ayan@ayan.net</email>
</author>
<published>2011-09-21T08:02:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c823cc3d568277aa6340d8df6981e34f4c4dee5'/>
<id>urn:sha1:4c823cc3d568277aa6340d8df6981e34f4c4dee5</id>
<content type='text'>
If the loop device is associated (lo-&gt;lo_state == Lo_bound), it will have
a valid bdev pointed to by lo-&gt;lo_device.  There is no reason to ever pass
an additional block_device pointer.

Signed-off-by: Ayan George &lt;ayan.george@canonical.com&gt;
Cc: Phillip Susi &lt;psusi@cfl.rr.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@google.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
