Re: request_queue use-after-free - inode_detach_wb()

2015-11-19 Thread Tejun Heo
Hello, On Thu, Nov 19, 2015 at 10:56:43PM +0100, Ilya Dryomov wrote: > Detaching the inode earlier is what I suggested in the first email, but > I didn't know if this kind of special casing was OK. I'll try it out. Yeah, I was confused. Sorry about that. On the surface, it looks like a special

Re: request_queue use-after-free - inode_detach_wb()

2015-11-19 Thread Tejun Heo
Hello, Ilya. On Thu, Nov 19, 2015 at 09:56:21PM +0100, Ilya Dryomov wrote: > > Yes, that's where *I* think we should be headed. Stuff in lower > > layers should stick around while upper layer things are around > > I think the fundamental problem is the embedding of bdi in the queue. > The lifeti

Re: request_queue use-after-free - inode_detach_wb()

2015-11-18 Thread Tejun Heo
Hello, Ilya. On Wed, Nov 18, 2015 at 04:48:06PM +0100, Ilya Dryomov wrote: > Just to be clear, the bdi/wb vs inode lifetime rules are that inodes > should always be within bdi/wb? There's been a lot of churn in this Yes, that's where *I* think we should be headed. Stuff in lower layers should s

Re: request_queue use-after-free - inode_detach_wb()

2015-11-18 Thread Tejun Heo
Hello, Ilya. On Wed, Nov 18, 2015 at 04:12:07PM +0100, Ilya Dryomov wrote: > > It's stinky that the bdi is going away while the inode is still there. > > Yeah, blkdev inodes are special and created early but I think it makes > > sense to keep the underlying structures (queue and bdi) around while

Re: request_queue use-after-free - inode_detach_wb()

2015-11-17 Thread Tejun Heo
Hello, Ilya. On Mon, Nov 16, 2015 at 09:59:18PM +0100, Ilya Dryomov wrote: ... > Looking at __blkdev_put(), the issue becomes clear: we are taking > precautions to flush before calling out to ->release() because, at > least according to the comment, ->release() can free queue; we are > recording o

Re: [PATCH 12/12] fs: remove default_backing_dev_info

2015-01-11 Thread Tejun Heo
> Signed-off-by: Christoph Hellwig Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 11/12] fs: don't reassign dirty inodes to default_backing_dev_info

2015-01-11 Thread Tejun Heo
worthwhile to mention that in the commit message. Other than that, Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 08/12] fs: remove mapping->backing_dev_info

2015-01-11 Thread Tejun Heo
On Thu, Jan 08, 2015 at 06:45:29PM +0100, Christoph Hellwig wrote: > Now that we never use the backing_dev_info pointer in struct address_space > we can simply remove it and save 4 to 8 bytes in every inode. > > Signed-off-by: Christoph Hellwig > Acked-by: Ryusuke Konishi Rev

Re: [PATCH 07/12] fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info

2015-01-11 Thread Tejun Heo
XPORT_SYMBOL_GPL(inode_to_bdi); This is rather trivial. Maybe we wanna make this an inline function? Reviewed-by: Tejun Heo -- tejun -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 06/12] nilfs2: set up s_bdi like the generic mount_bdev code

2015-01-11 Thread Tejun Heo
On Thu, Jan 08, 2015 at 06:45:27PM +0100, Christoph Hellwig wrote: > mapping->backing_dev_info will go away, so don't rely on it. > > Signed-off-by: Christoph Hellwig > Acked-by: Ryusuke Konishi Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this

Re: [PATCH 05/12] block_dev: get bdev inode bdi directly from the block device

2015-01-11 Thread Tejun Heo
On Thu, Jan 08, 2015 at 06:45:26PM +0100, Christoph Hellwig wrote: > Directly grab the backing_dev_info from the request_queue instead of > detouring through the address_space. > > Signed-off-by: Christoph Hellwig Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe fr

Re: [PATCH 04/12] block_dev: only write bdev inode on close

2015-01-11 Thread Tejun Heo
bdev_write_inode(bdev->bd_inode); Is this an optimization or something necessary for the following changes? If latter, maybe it's a good idea to state why this is necessary in the description? Otherwise, Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send

Re: [PATCH 03/12] fs: introduce f_op->mmap_capabilities for nommu mmap support

2015-01-11 Thread Tejun Heo
needed, and entirely gets rid of the concept of providing a > backing_dev_info for a character device. It also removes the need for > the mtd_inodefs filesystem. > > Signed-off-by: Christoph Hellwig FWIW, Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this li

Re: [PATCH 02/12] fs: kill BDI_CAP_SWAP_BACKED

2015-01-11 Thread Tejun Heo
mem > in favor of noop_backing_dev_info. > > Signed-off-by: Christoph Hellwig Reviewed-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/12] fs: deduplicate noop_backing_dev_info

2015-01-11 Thread Tejun Heo
On Thu, Jan 08, 2015 at 06:45:22PM +0100, Christoph Hellwig wrote: > hugetlbfs, kernfs and dlmfs can simply use noop_backing_dev_info instead > of creating a local duplicate. > > Signed-off-by: Christoph Hellwig For kernfs bits, Acked-by: Tejun Heo Thanks. -- tejun -- To unsu

[PATCH 8/9] ceph: WQ_NON_REENTRANT is meaningless and going away

2013-07-30 Thread Tejun Heo
non-reentrant") made WQ_NON_REENTRANT no-op and the flag is going away. Remove its usages. This patch doesn't introduce any behavior changes. Signed-off-by: Tejun Heo Cc: Sage Weil Cc: ceph-devel@vger.kernel.org --- net/ceph/messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 23/32] net/ceph: make ceph_msgr_wq non-reentrant

2011-01-03 Thread Tejun Heo
cold path and can be safely removed. * The number of concurrent work items is bound by the number of connections and connetions are independent from each other. With the default concurrency level, different connections will be executed independently. Signed-off-by: Tejun Heo Cc: Sag

[PATCH 22/32] ceph: fsc->*_wq's aren't used in memory reclaim path

2011-01-03 Thread Tejun Heo
fsc->*_wq's aren't depended upon during memory reclaim. Convert to alloc_workqueue() w/o WQ_MEM_RECLAIM. Signed-off-by: Tejun Heo Cc: Sage Weil Cc: ceph-devel@vger.kernel.org --- Only compile tested. Please feel free to take it into the subsystem tree or simply ack - I'll ro