Re: [PATCH 0/4 RFC] BDI lifetime fix

2017-01-31 Thread Jan Kara
On Thu 26-01-17 22:15:06, Dan Williams wrote: > On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara <j...@suse.cz> wrote: > > Hello, > > > > this patch series attempts to solve the problems with the life time of a > > backing_dev_info structure. Currently it lives in

[PATCH 1/4] block: Unhash block device inodes on gendisk destruction

2017-01-31 Thread Jan Kara
is dropped (which may be directly in del_gendisk()), the inode gets evicted. Furthermore if the major,minor pair gets reallocated, we are guaranteed to get new block device inode even if old block device inode is not yet evicted and thus we avoid issues with possible reuse of bdi. Signed-off-by: Jan

Re: [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info

2017-02-01 Thread Jan Kara
On Wed 01-02-17 01:50:07, Christoph Hellwig wrote: > On Tue, Jan 31, 2017 at 01:54:28PM +0100, Jan Kara wrote: > > Instead of storing backing_dev_info inside struct request_queue, > > allocate it dynamically, reference count it, and free it when the last > > reference is dr

Re: [PATCH 4/4] block: Make blk_get_backing_dev_info() safe without open bdev

2017-02-01 Thread Jan Kara
tic inside mm/backing_dev.c. What do you think? Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@v

Re: [PATCH 17/24] fuse: Convert to separately allocated bdi

2017-02-07 Thread Jan Kara
On Tue 07-02-17 10:16:58, Miklos Szeredi wrote: > On Thu, Feb 2, 2017 at 6:34 PM, Jan Kara <j...@suse.cz> wrote: > > Allocate struct backing_dev_info separately instead of embedding it > > inside the superblock. This unifies handling of bdi among users. > > Acke

Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-07 Thread Jan Kara
uctures except for bdi->wb) while block device inode can still live with a valid i_wb structure. CCed Tejun who is more familar with this code to verify my thoughts. Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR

Re: [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info

2017-02-02 Thread Jan Kara
On Wed 01-02-17 14:45:20, Jens Axboe wrote: > On 02/01/2017 04:22 AM, Jan Kara wrote: > > On Wed 01-02-17 01:50:07, Christoph Hellwig wrote: > >> On Tue, Jan 31, 2017 at 01:54:28PM +0100, Jan Kara wrote: > >>> Instead of storing backing_dev_info inside struct

[PATCH 1/5] block: Unhash block device inodes on gendisk destruction

2017-02-02 Thread Jan Kara
Hellwig <h...@lst.de> Signed-off-by: Jan Kara <j...@suse.cz> --- block/genhd.c | 2 ++ fs/block_dev.c | 15 +++ include/linux/fs.h | 1 + 3 files changed, 18 insertions(+) diff --git a/block/genhd.c b/block/genhd.c index fcd6d4fae657..f2f22d0e8e14 100644 --- a/b

[PATCH 0/5 v3] BDI lifetime fix

2017-02-02 Thread Jan Kara
Hello, this is the third version of the patch series that attempts to solve the problems with the life time of a backing_dev_info structure. Currently it lives inside request_queue structure and thus it gets destroyed as soon as request queue goes away. However the block device inode still stays

[PATCH 4/5] block: Make blk_get_backing_dev_info() safe without open bdev

2017-02-02 Thread Jan Kara
Laurent Dufour <lduf...@linux.vnet.ibm.com> Signed-off-by: Jan Kara <j...@suse.cz> --- block/blk-core.c | 8 +++- fs/block_dev.c | 7 +++ include/linux/fs.h | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index

[PATCH 5/5] block: Get rid of blk_get_backing_dev_info()

2017-02-02 Thread Jan Kara
blk_get_backing_dev_info() is now a simple dereference. Remove that function and simplify some code around that. Signed-off-by: Jan Kara <j...@suse.cz> --- block/blk-core.c| 14 -- block/compat_ioctl.c| 7 ++- block/ioctl.c | 7 ++---

[PATCH 2/5] block: Use pointer to backing_dev_info from request_queue

2017-02-02 Thread Jan Kara
We will want to have struct backing_dev_info allocated separately from struct request_queue. As the first step add pointer to backing_dev_info to request_queue and convert all users touching it. No functional changes in this patch. Reviewed-by: Christoph Hellwig <h...@lst.de> Signed-off-b

[PATCH 3/5] block: Dynamically allocate and refcount backing_dev_info

2017-02-02 Thread Jan Kara
-by: Jan Kara <j...@suse.cz> --- block/blk-core.c | 12 +--- block/blk-sysfs.c| 2 +- include/linux/backing-dev-defs.h | 2 ++ include/linux/backing-dev.h | 10 +- include/linux/blkdev.h | 1 - mm/backing-dev.c

Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-08 Thread Jan Kara
On Tue 07-02-17 12:21:01, Tejun Heo wrote: > Hello, > > On Tue, Feb 07, 2017 at 01:33:31PM +0100, Jan Kara wrote: > > > We can see above that inode->i_wb is in r31, and the machine crashed at > > > 0xc03799a0 so it was trying to dereference wb and crashed.

Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-08 Thread Jan Kara
On Wed 08-02-17 08:51:42, Jan Kara wrote: > On Tue 07-02-17 12:21:01, Tejun Heo wrote: > > Hello, > > > > On Tue, Feb 07, 2017 at 01:33:31PM +0100, Jan Kara wrote: > > > > We can see above that inode->i_wb is in r31, and the machine crashed at > &g

Re: [PATCH 22/24] ubifs: Convert to separately allocated bdi

2017-02-03 Thread Jan Kara
On Thu 02-02-17 21:34:32, Richard Weinberger wrote: > Jan, > > Am 02.02.2017 um 18:34 schrieb Jan Kara: > > Allocate struct backing_dev_info separately instead of embedding it > > inside the superblock. This unifies handling of bdi among users. > > > > CC: R

Re: [PATCH 04/24] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-02-03 Thread Jan Kara
On Thu 02-02-17 11:28:27, Liu Bo wrote: > Hi, > > On Thu, Feb 02, 2017 at 06:34:02PM +0100, Jan Kara wrote: > > Provide helper functions for setting up dynamically allocated > > backing_dev_info structures for filesystems and cleaning them up on > > superblock destruc

[PATCH 10/24] cifs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Steve French <sfre...@samba.org> CC: linux-c...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/cifs/cifs_fs_sb.h | 1 - fs/cifs/cifsf

[PATCH 24/24] block: Remove unused functions

2017-02-02 Thread Jan Kara
Now that all backing_dev_info structure are allocated separately, we can drop some unused functions. Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/backing-dev.h | 5 - mm/backing-dev.c| 54 + 2 files changed, 5 inse

[PATCH 17/24] fuse: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Miklos Szeredi <mik...@szeredi.hu> CC: linux-fsde...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/fuse/dev.c| 8 -

[PATCH 21/24] nfs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Trond Myklebust <trond.mykleb...@primarydata.com> CC: Anna Schumaker <anna.schuma...@netapp.com> CC: linux-...@vger.kernel.org Signed-off-by:

[PATCH 22/24] ubifs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
ists.infradead.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/ubifs/super.c | 23 +++ fs/ubifs/ubifs.h | 3 --- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index e08aa04fc835..34810eb52b22 100644 --- a/fs/ubifs/super.

[PATCH 03/24] block: Unregister bdi on last reference drop

2017-02-02 Thread Jan Kara
the second time if it is already unregistered. Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/backing-dev-defs.h | 3 ++- mm/backing-dev.c | 10 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/backing-dev-defs.h b/include

[PATCH 02/24] bdi: Provide bdi_register_va()

2017-02-02 Thread Jan Kara
Add function that registers bdi and takes va_list instead of variable number of arguments. Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/backing-dev.h | 2 ++ mm/backing-dev.c| 20 +++- 2 files changed, 17 insertions(+), 5 deletions(-) diff

[PATCH 04/24] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-02-02 Thread Jan Kara
tre-de...@lists.lustre.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/super.c | 49 include/linux/backing-dev-defs.h | 2 +- include/linux/fs.h | 6 + 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/fs/

[PATCH 16/24] exofs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Boaz Harrosh <o...@electrozaur.com> CC: Benny Halevy <bhal...@primarydata.com> CC: osd-...@open-osd.org Signed-off-by: Jan Kara <j...@suse.cz

[PATCH 08/24] btrfs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside superblock. This unifies handling of bdi among users. CC: Chris Mason <c...@fb.com> CC: Josef Bacik <jba...@fb.com> CC: David Sterba <dste...@suse.com> CC: linux-bt...@vger.kernel.org Signed-off-by: Jan

[PATCH 07/24] 9p: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
ceforge.net Signed-off-by: Jan Kara <j...@suse.cz> --- fs/9p/v9fs.c | 10 +- fs/9p/v9fs.h | 1 - fs/9p/vfs_super.c | 15 --- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 072e7599583a..0898a1a774fa 100644 --- a/

[PATCH 05/24] fs: Get proper reference for s_bdi

2017-02-02 Thread Jan Kara
device's BDI. No filesystem using mount_bdev() actually changes s_bdi so this is safe and will make bdev filesystems work the same way as filesystems needing to set up their private bdi. Signed-off-by: Jan Kara <j...@suse.cz> --- fs/super.c | 7 ++- 1 file changed, 2 insertions(+), 5 del

[PATCH 09/24] ceph: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside client structure. This unifies handling of bdi among users. CC: Ilya Dryomov <idryo...@gmail.com> CC: "Yan, Zheng" <z...@redhat.com> CC: Sage Weil <s...@redhat.com> CC: ceph-de...@vger.kernel.or

[PATCH 11/24] ecryptfs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Tyler Hicks <tyhi...@canonical.com> CC: ecryp...@vger.kernel.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/ecryptfs/ecryptfs_kernel.h | 1 -

[PATCH 12/24] afs: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: David Howells <dhowe...@redhat.com> CC: linux-...@lists.infradead.org Signed-off-by: Jan Kara <j...@suse.cz> --- fs/afs/internal.h | 1 - fs/afs/su

[PATCH 13/24] orangefs: Remove orangefs_backing_dev_info

2017-02-02 Thread Jan Kara
It is not used anywhere. CC: Mike Marshall <hub...@omnibond.com> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/orangefs/inode.c | 6 -- fs/orangefs/orangefs-kernel.h | 1 - fs/orangefs/orangefs-mod.c| 12 +--- 3 files changed, 1 insertion(+), 18 deleti

[PATCH 14/24] mtd: Convert to dynamically allocated bdi infrastructure

2017-02-02 Thread Jan Kara
ake mtd hold and drop bdi reference as needed which seems pointless for passing one global pointer... CC: David Woodhouse <dw...@infradead.org> CC: Brian Norris <computersforpe...@gmail.com> CC: linux-...@lists.infradead.org Signed-off-by: Jan Kara <j...@suse.cz> --- drivers

[PATCH 06/24] lustre: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
.@lists.lustre.org Signed-off-by: Jan Kara <j...@suse.cz> --- .../staging/lustre/lustre/include/lustre_disk.h| 4 drivers/staging/lustre/lustre/llite/llite_lib.c| 24 +++--- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/staging/lustre/lustre/

[PATCH 15/24] coda: Convert to separately allocated bdi

2017-02-02 Thread Jan Kara
Allocate struct backing_dev_info separately instead of embedding it inside the superblock. This unifies handling of bdi among users. CC: Jan Harkes <jahar...@cs.cmu.edu> CC: c...@cs.cmu.edu CC: codal...@coda.cs.cmu.edu Signed-off-by: Jan Kara <j...@suse.cz> --- fs/coda/inode.c

[PATCH 0/24 RFC] fs: Convert all embedded bdis into separate ones

2017-02-02 Thread Jan Kara
Hello, this patch series converts all embedded occurences of struct backing_dev_info to use standalone dynamically allocated structures. This makes bdi handling unified across all bdi users and generally removes some boilerplate code from filesystems setting up their own bdi. It also allows us to

[PATCH 01/24] block: Provide bdi_alloc()

2017-02-02 Thread Jan Kara
Provide bdi_alloc() forsimple allocation of a BDI that can be used by filesystems that don't need anything fancy. We use this function when converting filesystems from embedded struct backing_dev_info into a dynamically allocated one. Signed-off-by: Jan Kara <j...@suse.cz> --- include

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-23 Thread Jan Kara
On Fri 20-01-17 07:42:09, Dan Williams wrote: > On Fri, Jan 20, 2017 at 1:47 AM, Jan Kara <j...@suse.cz> wrote: > > On Thu 19-01-17 14:17:19, Vishal Verma wrote: > >> On 01/18, Jan Kara wrote: > >> > On Tue 17-01-17 15:37:05, Vishal Verma wrote: > >>

Re: [Lsf-pc] [LSF/MM TOPIC] block level event logging for storage media management

2017-01-25 Thread Jan Kara
le. WRT filtering, you can enable each tracepoint individually. Granted that is not exactly the 'event mask' feature you ask about but that can be easily scripted in userspace if you give some structure to tracepoint names. Finally tracepoints provide a fine grained control you never get with prin

[PATCH 0/4 RFC] BDI lifetime fix

2017-01-26 Thread Jan Kara
Hello, this patch series attempts to solve the problems with the life time of a backing_dev_info structure. Currently it lives inside request_queue structure and thus it gets destroyed as soon as request queue goes away. However the block device inode still stays around and thus inode_to_bdi()

[PATCH 4/4] block: Make blk_get_backing_dev_info() safe without open bdev

2017-01-26 Thread Jan Kara
irst open of the block device and drop the reference only once the inode is evicted from memory. This pins struct backing_dev_info in memory and thus fixes the crashes. Reported-by: Dan Williams <dan.j.willi...@intel.com> Reported-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> Signed-off-by: J

[PATCH 1/4] block: Unhash block device inodes on gendisk destruction

2017-01-26 Thread Jan Kara
is dropped (which may be directly in del_gendisk()), the inode gets evicted. Furthermore if the major,minor pair gets reallocated, we are guaranteed to get new block device inode even if old block device inode is not yet evicted and thus we avoid issues with possible reuse of bdi. Signed-off-by: Jan

[PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info

2017-01-26 Thread Jan Kara
-by: Jan Kara <j...@suse.cz> --- block/blk-core.c | 10 -- block/blk-sysfs.c| 2 +- include/linux/backing-dev-defs.h | 4 +++- include/linux/backing-dev.h | 10 +- include/linux/blkdev.h | 1 - mm/backing-dev.c

Re: [PATCH 0/4 RFC] BDI lifetime fix

2017-01-30 Thread Jan Kara
On Thu 26-01-17 22:15:06, Dan Williams wrote: > On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara <j...@suse.cz> wrote: > > Hello, > > > > this patch series attempts to solve the problems with the life time of a > > backing_dev_info structure. Currently it lives in

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-26 Thread Jan Kara
was a one line change to bdev_get_queue() to > >> prevent a shutdown crash when del_gendisk() races the final > >> __blkdev_put(). > >> > >> While it is known at del_gendisk() time that the queue is still alive, > >> Jan Kara points to other paths [2] that

Re: [PATCH 04/13] block: Move bdi_unregister() to del_gendisk()

2017-02-22 Thread Jan Kara
On Tue 21-02-17 19:53:29, Bart Van Assche wrote: > On 02/21/2017 09:55 AM, Jan Kara wrote: > > diff --git a/block/blk-core.c b/block/blk-core.c > > index 47104f6a398b..9a901dcfdd5c 100644 > > --- a/block/blk-core.c > > +++ b/block/blk-core.c > > @@ -580,8 +580,6

Re: [PATCH 0/13 v2] block: Fix block device shutdown related races

2017-02-22 Thread Jan Kara
On Tue 21-02-17 10:19:28, Jens Axboe wrote: > On 02/21/2017 10:09 AM, Jan Kara wrote: > > Hello, > > > > this is a second revision of the patch set to fix several different races > > and > > issues I've found when testing device shutdown and reuse. The

Re: [PATCH 08/10] block: Fix oops in locked_inode_to_wb_and_lock_list()

2017-02-20 Thread Jan Kara
On Sun 12-02-17 13:40:27, Tejun Heo wrote: > Hello, Jan. > > On Thu, Feb 09, 2017 at 01:44:31PM +0100, Jan Kara wrote: > > When block device is closed, we call inode_detach_wb() in __blkdev_put() > > which sets inode->i_wb to NULL. That is contrary to expectations that >

Re: [PATCH 01/10] block: Move bdev_unhash_inode() after invalidate_partition()

2017-02-20 Thread Jan Kara
On Sun 12-02-17 12:58:33, Tejun Heo wrote: > On Thu, Feb 09, 2017 at 01:44:24PM +0100, Jan Kara wrote: > > Move bdev_unhash_inode() after invalidate_partition() as > > invalidate_partition() looks up bdev and will unnecessarily recreate it > > if bdev_unhash_inode() d

[PATCH 02/13] block: Unhash also block device inode for the whole device

2017-02-21 Thread Jan Kara
Heo <t...@kernel.org> Signed-off-by: Jan Kara <j...@suse.cz> --- block/genhd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/genhd.c b/block/genhd.c index 6cb9f3a34a92..f6c4d4400759 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -655,6 +655,7 @@ void del_gendisk(st

[PATCH 11/13] block: Fix oops in locked_inode_to_wb_and_lock_list()

2017-02-21 Thread Jan Kara
ach_wb() in a dangerous way. Reported-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/block_dev.c| 8 ++-- include/linux/writeback.h | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/block_dev.c b/fs

[PATCH 06/13] bdi: Make wb->bdi a proper reference

2017-02-21 Thread Jan Kara
Make wb->bdi a proper refcounted reference to bdi for all bdi_writeback structures except for the one embedded inside struct backing_dev_info. That will allow us to simplify bdi unregistration. Signed-off-by: Jan Kara <j...@suse.cz> --- mm/backing-dev.c | 13 +++-- 1 file ch

[PATCH 07/13] bdi: Move removal from bdi->wb_list into wb_shutdown()

2017-02-21 Thread Jan Kara
ack shutdown in cgwb_bdi_destroy(). Signed-off-by: Jan Kara <j...@suse.cz> --- mm/backing-dev.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index d7aaf2517c30..54b9e934eef4 100644 --- a/mm/backing-dev.c +++ b/mm/back

[PATCH 08/13] bdi: Shutdown writeback on all cgwbs in cgwb_bdi_destroy()

2017-02-21 Thread Jan Kara
. Signed-off-by: Jan Kara <j...@suse.cz> --- mm/backing-dev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 54b9e934eef4..c9623b410170 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -700,6 +700,7 @@ static void cgwb_bdi_destroy(

[PATCH 12/13] kobject: Export kobject_get_unless_zero()

2017-02-21 Thread Jan Kara
Make the function available for outside use and fortify it against NULL kobject. CC: Greg Kroah-Hartman <gre...@linuxfoundation.org> Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/kobject.h | 2 ++ lib/kobject.c | 5

[PATCH 01/13] block: Move bdev_unhash_inode() after invalidate_partition()

2017-02-21 Thread Jan Kara
bdev_unhash_inode() instead of manually creating the device number. Tested-by: Lekshmi Pillai <lekshmicpil...@in.ibm.com> Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Jan Kara <j...@suse.cz> --- block/genhd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 10/13] bdi: Rename cgwb_bdi_destroy() to cgwb_bdi_unregister()

2017-02-21 Thread Jan Kara
Rename cgwb_bdi_destroy() to cgwb_bdi_unregister() as it gets called from bdi_unregister() which is not necessarily called from bdi_destroy() and thus the name is somewhat misleading. Signed-off-by: Jan Kara <j...@suse.cz> --- mm/backing-dev.c | 6 +++--- 1 file changed, 3 insertions

[PATCH 0/13 v2] block: Fix block device shutdown related races

2017-02-21 Thread Jan Kara
Hello, this is a second revision of the patch set to fix several different races and issues I've found when testing device shutdown and reuse. The first three patches are fixes to problems in my previous series fixing BDI lifetime issues. Patch 4 fixes issues with reuse of BDI name with scsi

[PATCH 13/13] block: Fix oops scsi_disk_get()

2017-02-21 Thread Jan Kara
-by: Lekshmi Pillai <lekshmicpil...@in.ibm.com> Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Jan Kara <j...@suse.cz> --- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index 68c613edb93a..2baacfea7b5e 100644 -

[PATCH 09/13] bdi: Do not wait for cgwbs release in bdi_unregister()

2017-02-21 Thread Jan Kara
ack directly. Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/backing-dev-defs.h | 1 - mm/backing-dev.c | 18 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 8fb

[PATCH 03/13] block: Revalidate i_bdev reference in bd_aquire()

2017-02-21 Thread Jan Kara
<lekshmicpil...@in.ibm.com> Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Jan Kara <j...@suse.cz> --- fs/block_dev.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 601b71b76d7f..68e855fdce58 100644 --- a/fs/bl

[PATCH 09/10] kobject: Export kobject_get_unless_zero()

2017-02-09 Thread Jan Kara
Make the function available for outside use and fortify it against NULL kobject. Signed-off-by: Jan Kara <j...@suse.cz> --- include/linux/kobject.h | 2 ++ lib/kobject.c | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/kobject.h b/include

[PATCH 10/10] block: Fix oops scsi_disk_get()

2017-02-09 Thread Jan Kara
-off-by: Jan Kara <j...@suse.cz> --- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/genhd.c b/block/genhd.c index 721921a140cc..e3dbc311c323 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1350,7 +1350,7 @@ struct kobject *get_disk(struct gendisk

[PATCH 06/10] writeback: Move __inode_wait_for_state_bit

2017-02-09 Thread Jan Kara
Move it up in fs/fs-writeback.c so that we don't have to use forward declarations. No code change. Signed-off-by: Jan Kara <j...@suse.cz> --- fs/fs-writeback.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fs/fs-writeback.c b

[PATCH 08/10] block: Fix oops in locked_inode_to_wb_and_lock_list()

2017-02-09 Thread Jan Kara
(requires synchronize_rcu()) we do the switching only in del_gendisk() when we know the device is going away. Also add a warning to catch if someone uses inode_detach_wb() in a dangerous way. Reported-by: Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> Signed-off-by: Jan Kara <j...@s

[PATCH 07/10] writeback: Implement reliable switching to default writeback structure

2017-02-09 Thread Jan Kara
ing to be shutdown. Signed-off-by: Jan Kara <j...@suse.cz> --- fs/fs-writeback.c | 60 --- include/linux/fs.h| 3 ++- include/linux/writeback.h | 6 + 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/fs/fs-writeback.

Re: [PATCH 03/10] block: Revalidate i_bdev reference in bd_aquire()

2017-02-09 Thread Jan Kara
On Thu 09-02-17 13:44:26, Jan Kara wrote: > When a device gets removed, block device inode unhashed so that it is not > used anymore (bdget() will not find it anymore). Later when a new device > gets created with the same device number, we create new block device > inode. However there

Re: [PATCH 05/24] fs: Get proper reference for s_bdi

2017-02-09 Thread Jan Kara
On Thu 09-02-17 16:36:13, Boaz Harrosh wrote: > On 02/02/2017 07:34 PM, Jan Kara wrote: > > So far we just relied on block device to hold a bdi reference for us > > while the filesystem is mounted. While that works perfectly fine, it is > > a bit awkward that we have a po

Re: [PATCH 0/10] block: Fix block device shutdown related races

2017-02-09 Thread Jan Kara
On Thu 09-02-17 12:52:47, Thiago Jung Bauermann wrote: > Hello Jan, > > Am Donnerstag, 9. Februar 2017, 13:44:23 BRST schrieb Jan Kara: > > People, please have a look at patches. The are mostly simple however the > > interactions are rather complex so I may have misse

[PATCH 01/10] block: Move bdev_unhash_inode() after invalidate_partition()

2017-02-09 Thread Jan Kara
Move bdev_unhash_inode() after invalidate_partition() as invalidate_partition() looks up bdev and will unnecessarily recreate it if bdev_unhash_inode() destroyed it. Also use part_devt() when calling bdev_unhash_inode() instead of manually creating the device number. Signed-off-by: Jan Kara &l

[PATCH 05/10] writeback: Generalize and standardize I_SYNC waiting function

2017-02-09 Thread Jan Kara
. Signed-off-by: Jan Kara <j...@suse.cz> --- fs/fs-writeback.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index ef600591d96f..c9770de11650 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1170,21 +1

Re: [PATCH 22/24] ubifs: Convert to separately allocated bdi

2017-02-09 Thread Jan Kara
On Wed 08-02-17 12:24:00, Richard Weinberger wrote: > Am 02.02.2017 um 18:34 schrieb Jan Kara: > > Allocate struct backing_dev_info separately instead of embedding it > > inside the superblock. This unifies handling of bdi among users. > > > > CC: Richard Weinberger <

Re: [lustre-devel] [PATCH 04/24] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-02-09 Thread Jan Kara
> > Looks fine otherwise. Thanks, fixed. Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR

Re: [PATCH 07/10] writeback: Implement reliable switching to default writeback structure

2017-02-10 Thread Jan Kara
On Fri 10-02-17 13:19:44, NeilBrown wrote: > On Thu, Feb 09 2017, Jan Kara wrote: > > > Currently switching of inode between different writeback structures is > > asynchronous and not guaranteed to succeed. Add a variant of switching > > that is synchronous and reliable

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-18 Thread Jan Kara
it gets EIO from memcpy on write? Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More ma

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-18 Thread Jan Kara
ode like we do now looks good enough? Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Lsf-pc] [LSF/MM ATTEND] Un-addressable device memory and block/fs implications

2017-01-18 Thread Jan Kara
equest to attend? You posted it as a reply to another email so it is not really clear. Note that each attend request should be a separate email so that it does not get lost... Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR -- To unsubsc

Re: [Lsf-pc] [LSF/MM TOPIC] Future direction of DAX

2017-01-17 Thread Jan Kara
r performance data suggesting it would > be a win? If so, what work needs to be done to get 1 GiB sized and aligned > filesystem block allocations, to get the required enabling in the MM layer, > etc? I'm not convinced it is worth it now. Maybe later...

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-20 Thread Jan Kara
On Thu 19-01-17 11:03:12, Dan Williams wrote: > On Thu, Jan 19, 2017 at 10:59 AM, Vishal Verma <vishal.l.ve...@intel.com> > wrote: > > On 01/19, Jan Kara wrote: > >> On Wed 18-01-17 21:56:58, Verma, Vishal L wrote: > >> > On Wed, 2017-01-18 at 13:32 -0800, D

Re: [Lsf-pc] [LSF/MM TOPIC] Badblocks checking/representation in filesystems

2017-01-20 Thread Jan Kara
On Thu 19-01-17 14:17:19, Vishal Verma wrote: > On 01/18, Jan Kara wrote: > > On Tue 17-01-17 15:37:05, Vishal Verma wrote: > > 2) PMEM is exposed for DAX aware filesystem. This seems to be what you are > > mostly interested in. We could possibly do something more efficient

Re: [PATCH 0/13 v2] block: Fix block device shutdown related races

2017-03-01 Thread Jan Kara
leanup but for now I left it alone... Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR

Re: [PATCH 0/13 v2] block: Fix block device shutdown related races

2017-03-01 Thread Jan Kara
On Tue 28-02-17 23:26:53, Omar Sandoval wrote: > On Tue, Feb 28, 2017 at 11:25:28PM -0800, Omar Sandoval wrote: > > On Wed, Feb 22, 2017 at 11:24:25AM +0100, Jan Kara wrote: > > > On Tue 21-02-17 10:19:28, Jens Axboe wrote: > > > > On 02/21/2017 10:09 AM, J

Re: [PATCH] cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode

2017-03-02 Thread Jan Kara
cfqg->vdisktime = __cfqg->vdisktime + CFQ_IDLE_DELAY; > + cfqg->vdisktime = __cfqg->vdisktime + > + cfq_get_cfqg_vdisktime_delay(cfqd); > } else > cfqg->vdisktime = st->min_vdisktime; > cfq_group_service_tree_add(st, cfqg); > -- > 2.5.0 > -- Jan Kara <j...@suse.com> SUSE Labs, CR

Re: [PATCH 7/8] blk-wbt: add general throttling mechanism

2016-11-08 Thread Jan Kara
*don't have a valid read/write sample. For that case, > + *slowly return to center state (step == 0). > + * 2) We started a the center step, but don't have a valid > + *read/write sample, but we do have writes going on. > +

Re: [PATCH 8/8] block: hook up writeback throttling

2016-11-08 Thread Jan Kara
t case, since we will > rely on CFQ doing that for us. Just one nit: Don't you miss wbt_exit() call for legacy block layer? I don't see where that happens. Honza -- Jan Kara <j...@suse.com> SUSE Labs, CR -- To unsubscribe fro

Re: [PATCH 6/8] block: add scalable completion tracking of requests

2016-11-08 Thread Jan Kara
blk_queue_stat_get(q, stat); > + > + ret = print_stat(page, [0], "read :"); > + ret += print_stat(page + ret, [1], "write:"); > + return ret; > +} > + > static struct queue_sysfs_entry queue_requests_entry = { > .attr = {.name = "nr_reque

Re: [PATCH 6/8] block: add scalable completion tracking of requests

2016-11-10 Thread Jan Kara
On Wed 09-11-16 12:52:25, Jens Axboe wrote: > On 11/09/2016 09:09 AM, Jens Axboe wrote: > >On 11/09/2016 02:01 AM, Jan Kara wrote: > >>On Tue 08-11-16 08:25:52, Jens Axboe wrote: > >>>On 11/08/2016 06:30 AM, Jan Kara wrote: > >>>>On Tue 01-11-16 15:08:

Re: [PATCH 5/8] block: add code to track actual device queue depth

2016-11-05 Thread Jan Kara
kup of requests for merging. > > Fill a hole in struct request with a 'queue_depth' member, that > drivers can call to more closely inform the block layer of the > real queue depth. > > Signed-off-by: Jens Axboe <ax...@fb.com> The patch looks good to me. You can ad

Re: [PATCH 3/8] writeback: mark background writeback as such

2016-11-05 Thread Jan Kara
On Tue 01-11-16 15:08:46, Jens Axboe wrote: > If we're doing background type writes, then use the appropriate > background write flags for that. > > Signed-off-by: Jens Axboe <ax...@fb.com> Looks good. You can add: Reviewed-by: Jan

Re: [PATCH 1/8] block: add WRITE_BACKGROUND

2016-11-05 Thread Jan Kara
On Tue 01-11-16 15:08:44, Jens Axboe wrote: > This adds a new request flag, REQ_BACKGROUND, that callers can use to > tell the block layer that this is background (non-urgent) IO. > > Signed-off-by: Jens Axboe <ax...@fb.com> Looks good. You can add: Reviewed-by: Jan

[PATCH 1/2] brd: Make rd_size argument static

2016-10-25 Thread Jan Kara
rd_size does not appear to be used outside of brd. Make it static. Signed-off-by: Jan Kara <j...@suse.cz> --- drivers/block/brd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 0c76d4016eeb..8b22e4a04918 100644 --- a/d

Re: [PATCH 2/2] blk-wbt: remove stat ops

2016-11-14 Thread Jan Kara
On Fri 11-11-16 08:21:57, Jens Axboe wrote: > Again a leftover from when the throttling code was generic. Now that we > just have the block user, get rid of the stat ops and indirections. > > Signed-off-by: Jens Axboe <ax...@fb.com> Looks good to me. You can add: Review

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-01 Thread Jan Kara
On Mon 31-10-16 21:10:35, Kirill A. Shutemov wrote: > [ My mail system got broken and original reply didn't get to through. Resent. > ] OK, this answers some of my questions from previous email so disregard that one. > On Thu, Oct 13, 2016 at 11:33:13AM +0200, Jan Kara wrote: > &g

Re: [PATCH 00/14] introduce the BFQ-v0 I/O scheduler as an extra scheduler

2016-10-28 Thread Jan Kara
On Thu 27-10-16 10:26:18, Jens Axboe wrote: > On 10/27/2016 03:26 AM, Jan Kara wrote: > >On Wed 26-10-16 10:12:38, Jens Axboe wrote: > >>On 10/26/2016 10:04 AM, Paolo Valente wrote: > >>> > >>>>Il giorno 26 ott 2016, alle ore 17:32, J

Re: [PATCH 00/14] introduce the BFQ-v0 I/O scheduler as an extra scheduler

2016-10-27 Thread Jan Kara
ard either. That can co-exist with a real multiqueue > scheduler as well, something that's geared towards some fairness for > faster devices. OK, so some solution like having a variant of blk_sq_make_request() that will consume requests, do IO scheduling decisions on them, and feed them into the

Re: [PATCHv3 17/41] filemap: handle huge pages in filemap_fdatawait_range()

2016-10-31 Thread Jan Kara
On Mon 24-10-16 14:36:25, Kirill A. Shutemov wrote: > On Thu, Oct 13, 2016 at 03:18:02PM +0200, Jan Kara wrote: > > On Thu 13-10-16 15:08:44, Kirill A. Shutemov wrote: > > > On Thu, Oct 13, 2016 at 11:44:41AM +0200, Jan Kara wrote: > > > > On Thu 15-09-16 14:5

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-03 Thread Jan Kara
On Wed 02-11-16 07:36:12, Christoph Hellwig wrote: > On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > > I'd also note that having PMD-sized pages has some obvious disadvantages as > > well: > > > > 1) I'm not sure buffer head handling code will quite sc

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-11-03 Thread Jan Kara
On Wed 02-11-16 11:32:04, Kirill A. Shutemov wrote: > On Tue, Nov 01, 2016 at 05:39:40PM +0100, Jan Kara wrote: > > On Mon 31-10-16 21:10:35, Kirill A. Shutemov wrote: > > > > If I understand the motivation right, it is mostly about being able to > > > > mmap >

Re: [PATCHv3 14/41] filemap: allocate huge page in page_cache_read(), if allowed

2016-10-11 Thread Jan Kara
> + __inc_node_page_state(page, NR_FILE_THPS); > + } > + } else { > + error = page_cache_tree_insert(mapping, page, shadowp); > + } And I'd prefer to have this logic moved to page_cache_tree_insert() because logically it IMHO belon

  1   2   3   4   5   >