<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/block_dev.c, branch v2.6.35.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/block_dev.c?h=v2.6.35.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/block_dev.c?h=v2.6.35.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-13T20:30:51Z</updated>
<entry>
<title>blkdev: cgroup whitelist permission fix</title>
<updated>2010-08-13T20:30:51Z</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@sous-sol.org</email>
</author>
<published>2010-08-11T01:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eff3960f25026fbeb854303535974491a5afba13'/>
<id>urn:sha1:eff3960f25026fbeb854303535974491a5afba13</id>
<content type='text'>
commit b7300b78d1a87625975a799a109a2f98d77757c8 upstream.

The cgroup device whitelist code gets confused when trying to grant
permission to a disk partition that is not currently open.  Part of
blkdev_open() includes __blkdev_get() on the whole disk.

Basically, the only ways to reliably allow a cgroup access to a partition
on a block device when using the whitelist are to 1) also give it access
to the whole block device or 2) make sure the partition is already open in
a different context.

The patch avoids the cgroup check for the whole disk case when opening a
partition.

Addresses https://bugzilla.redhat.com/show_bug.cgi?id=589662

Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Acked-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Tested-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Reported-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: "Daniel P. Berrange" &lt;berrange@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>block_dev: always serialize exclusive open attempts</title>
<updated>2010-08-10T18:09:14Z</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2010-08-04T15:59:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=acdc70839d626fa98417b8905bfa1e88087f3097'/>
<id>urn:sha1:acdc70839d626fa98417b8905bfa1e88087f3097</id>
<content type='text'>
commit e75aa85892b2ee78c79edac720868cbef16e62eb upstream.

bd_prepare_to_claim() incorrectly allowed multiple attempts for
exclusive open to progress in parallel if the attempting holders are
identical.  This triggered BUG_ON() as reported in the following bug.

  https://bugzilla.kernel.org/show_bug.cgi?id=16393

__bd_abort_claiming() is used to finish claiming blocks and doesn't
work if multiple openers are inside a claiming block.  Allowing
multiple parallel open attempts to continue doesn't gain anything as
those are serialized down in the call chain anyway.  Fix it by always
allowing only single open attempt in a claiming block.

This problem can easily be reproduced by adding a delay after
bd_prepare_to_claim() and attempting to mount two partitions of a
disk.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Markus Trippelsdorf &lt;markus@trippelsdorf.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>block: remove duplicate BUG_ON() in bd_finish_claiming()</title>
<updated>2010-06-10T17:08:34Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-06-07T18:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e6c05052c262ebe7fdd85e75e9d4f956cdd8d82'/>
<id>urn:sha1:3e6c05052c262ebe7fdd85e75e9d4f956cdd8d82</id>
<content type='text'>
We do the same BUG_ON() just a line later when calling into
__bd_abort_claiming().

Reported-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: bd_start_claiming cleanup</title>
<updated>2010-06-10T17:08:34Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-05-25T15:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0018361c3f934858592cbbb5e1a4f318c2a70ed'/>
<id>urn:sha1:b0018361c3f934858592cbbb5e1a4f318c2a70ed</id>
<content type='text'>
I don't like the subtle multi-context code in bd_claim (ie.  detects where it
has been called based on bd_claiming). It seems clearer to just require a new
function to finish a 2-part claim.

Also improve commentary in bd_start_claiming as to how it should
be used.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: bd_start_claiming fix module refcount</title>
<updated>2010-06-10T17:08:34Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-05-25T15:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf3425707ed9ce0d5ebaba20bc3d22dd39e52f2f'/>
<id>urn:sha1:cf3425707ed9ce0d5ebaba20bc3d22dd39e52f2f</id>
<content type='text'>
bd_start_claiming has an unbalanced module_put introduced in 6b4517a79.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>fs: convert simple fs to new truncate</title>
<updated>2010-05-28T02:15:47Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-05-27T12:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3322e79a3860fd0d50e3c1879b2e98ac582c0ff6'/>
<id>urn:sha1:3322e79a3860fd0d50e3c1879b2e98ac582c0ff6</id>
<content type='text'>
Convert simple filesystems: ramfs, configfs, sysfs, block_dev to new truncate
sequence.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>drop unused dentry argument to -&gt;fsync</title>
<updated>2010-05-28T02:05:02Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-05-26T15:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ea8085910ef3dd4f3cad6845aaa2b580d39b115'/>
<id>urn:sha1:7ea8085910ef3dd4f3cad6845aaa2b580d39b115</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6</title>
<updated>2010-05-22T02:37:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-05-22T02:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8bebe2f71d26871b0970ae1d9cf0ed3cdd9569d'/>
<id>urn:sha1:e8bebe2f71d26871b0970ae1d9cf0ed3cdd9569d</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (69 commits)
  fix handling of offsets in cris eeprom.c, get rid of fake on-stack files
  get rid of home-grown mutex in cris eeprom.c
  switch ecryptfs_write() to struct inode *, kill on-stack fake files
  switch ecryptfs_get_locked_page() to struct inode *
  simplify access to ecryptfs inodes in -&gt;readpage() and friends
  AFS: Don't put struct file on the stack
  Ban ecryptfs over ecryptfs
  logfs: replace inode uid,gid,mode initialization with helper function
  ufs: replace inode uid,gid,mode initialization with helper function
  udf: replace inode uid,gid,mode init with helper
  ubifs: replace inode uid,gid,mode initialization with helper function
  sysv: replace inode uid,gid,mode initialization with helper function
  reiserfs: replace inode uid,gid,mode initialization with helper function
  ramfs: replace inode uid,gid,mode initialization with helper function
  omfs: replace inode uid,gid,mode initialization with helper function
  bfs: replace inode uid,gid,mode initialization with helper function
  ocfs2: replace inode uid,gid,mode initialization with helper function
  nilfs2: replace inode uid,gid,mode initialization with helper function
  minix: replace inode uid,gid,mode init with helper
  ext4: replace inode uid,gid,mode init with helper
  ...

Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)
</content>
</entry>
<entry>
<title>Introduce freeze_super and thaw_super for the fsfreeze ioctl</title>
<updated>2010-05-21T22:31:18Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@redhat.com</email>
</author>
<published>2010-03-23T14:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18e9e5104fcd9a973ffe3eed3816c87f2a1b6cd2'/>
<id>urn:sha1:18e9e5104fcd9a973ffe3eed3816c87f2a1b6cd2</id>
<content type='text'>
Currently the way we do freezing is by passing sb&gt;s_bdev to freeze_bdev and then
letting it do all the work.  But freezing is more of an fs thing, and doesn't
really have much to do with the bdev at all, all the work gets done with the
super.  In btrfs we do not populate s_bdev, since we can have multiple bdev's
for one fs and setting s_bdev makes removing devices from a pool kind of tricky.
This means that freezing a btrfs filesystem fails, which causes us to corrupt
with things like tux-on-ice which use the fsfreeze mechanism.  So instead of
populating sb-&gt;s_bdev with a random bdev in our pool, I've broken the actual fs
freezing stuff into freeze_super and thaw_super.  These just take the
super_block that we're freezing and does the appropriate work.  It's basically
just copy and pasted from freeze_bdev.  I've then converted freeze_bdev over to
use the new super helpers.  I've tested this with ext4 and btrfs and verified
everything continues to work the same as before.

The only new gotcha is multiple calls to the fsfreeze ioctl will return EBUSY if
the fs is already frozen.  I thought this was a better solution than adding a
freeze counter to the super_block, but if everybody hates this idea I'm open to
suggestions.  Thanks,

Signed-off-by: Josef Bacik &lt;josef@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Move grabbing s_umount to callers of grab_super()</title>
<updated>2010-05-21T22:31:17Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-03-23T15:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3f2147307cce9eac56dd91d381709aa3f1615b3'/>
<id>urn:sha1:d3f2147307cce9eac56dd91d381709aa3f1615b3</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
