Re: [PATCH RFC] __bd_forget should wait for inodes using themapping

From: Andrew Morton
Date: Fri Jun 18 2004 - 18:49:44 EST


Chris Mason <mason@xxxxxxxx> wrote:
>
> On Fri, 2004-06-18 at 17:27, Andrew Morton wrote:
> > Chris Mason <mason@xxxxxxxx> wrote:
> > >
> > > [ skip writing block-special inodes ]
> > >
> > > Hmmm, any risk in missing data integrity syncs because of this?
> >
> > Need to think about that. sys_fsync(), sys_fdatasync() and sys_msync() go
> > direct to file->f_mapping and sys_sync() will sync the blockdev via its
> > kernel-internal inode. What does that leave?
>
> I was worried about O_SYNC, That actually looks safe though,
> generic_osync_inode will first write the mapping via filemap_fdatawrite
> (the mapping comes from f_mapping).
>
> It doesn't really give me warm fuzzies, but looks safe enough. Al had a
> slightly different plan, maybe with your patch we can push his larger
> changes off a bit?

>From a design POV the patch I sent isn't very nice, and does add code to a
warmpath. If there's some way in which we can defer the i_mapping switch
until all references have gone away, that would be better?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/