RE: Deadlock in ceph journal

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

 



Sounds good. Can you send a patch?

sage


On Mon, 25 Aug 2014, Ma, Jianpeng wrote:

> Hi all,
>    At weekend, I read the kernel code about aio & direction. For close(), it don't wait aio to complete.
> But for fsync(), it will wait all aio to complete. 
>    Mark used this patch(which using fsync() on write_thread_entry) and the result is looks good.
>    I want to revert the patch which don't use aio when closing journal. And using fsync(). It make the code simple.
>    How about this?
> 
> Thanks!
> Jianpeng
> 
> > ceph-devel@xxxxxxxxxxxxxxx
> > Subject: Re: Deadlock in ceph journal
> > 
> > On 23/08/14 10:22, Somnath Roy wrote:
> > > I think it is using direct io for non-aio mode as well.
> > >
> > > Thanks & Regards
> > > Somnath
> > >
> > 
> > > One thing that does still concern me - if I understand what is happening here
> > correctly: we write to the journal using aio until we want to stop doing writes
> > (presumably pre closing it), then use normal io to write at that point.
> > >
> > > Given that we appear to be using direct io whenever we use aio, does this
> > mean we end up mixing direct and buffered io to the journal [1] (or is the
> > normal i.e non aio write still using direct io)?
> > >
> > >
> > 
> > Thanks Somnath,
> > 
> > I think you are correct (I missed the bit in FileJournal::_open that seems to
> > cover this):
> > 
> > 
> >    if (forwrite) {
> >      flags = O_RDWR;
> >      if (directio)
> >        flags |= O_DIRECT | O_DSYNC;
> > 
> > 
> > i.e the journal is opened with DIRECT, so all writes (async or not) will
> > be direct.
> > 
> > Cheers
> > 
> > Mark
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux