Re: [RFC] vfs/inode: For none-block-based filesystems default to sb->s_bdi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 05-10-10 11:29:55, Boaz Harrosh wrote:
> On 10/05/2010 11:09 AM, Jan Kara wrote:
> > On Tue 05-10-10 09:53:41, Boaz Harrosh wrote:
> >> On 10/05/2010 04:32 AM, Jan Kara wrote:
> >>>   Hi Boaz,
> >>>
> >>> On Mon 04-10-10 18:02:13, Boaz Harrosh wrote:
> >>>> Sorry I've just seen Jan's patch:
> >>>> From: Jan Kara <jack@xxxxxxx>
> >>>> Date: Mon, 27 Sep 2010 23:56:48 +0200
> >>>> Subject: [PATCH] bdi: Initialize inode->i_mapping.backing_dev_info to sb->s_bdi
> >>> ...
> >>>> That works for me as well. Was it decided how to solve this? Other wise
> >>>> I'll need to patch exofs, ASAP for this -rc
> >>>   In the end, we'll use Christoph's patch
> >>> (http://lkml.org/lkml/2010/9/29/76) changing inode_to_bdi() to be
> >>> more conservative and also the warning will be gone. So you don't have to
> >>> patch anything...
> >>>
> >> I would still like to fix it. Currently each inode->mapping.backing_dev_info in my
> >> none-block-filesystem is set to &default_backing_dev_info. This sounds scary!
> >> what about the future patches that will schedule a wakup on set_inode_dirty ?
> >> Will they not need my proper sb->s_bdi on each ->mapping?
> >   Yes, but Christoph is working on separating the bdi handling from
> > handling of writeback (pointed from superblock) and that should solve this
> > problem as well.
> > 
> 
> If you are right and inode->i_mapping.backing_dev_info will only be used for bdev
> inodes, then I prefer if it would be NULL by default and not pointing to
> &default_backing_dev_info. Will that be fixed as well?
> 
> diff --git a/fs/inode.c b/fs/inode.c
> index 8646433..0ec4c47 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -168,7 +168,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
>  	mapping->flags = 0;
>  	mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE);
>  	mapping->assoc_mapping = NULL;
> -	mapping->backing_dev_info = &default_backing_dev_info;
> +	mapping->backing_dev_info = NULL;
>  	mapping->writeback_index = 0;
>  
>  	/*
> 
> Current code in inode_init_always() looks really ugly with that if(sb->s_bdev) ...
> surely you want to fix that too, No?
  Well, for now I'm happy that that can of worms has been closed with
Christoph's patch and I'll look into it again when Christoph comes with
his rework... Then we can do also cleanups like you suggest above.

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux