RE: Deadlock in ceph journal

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

 



The attachment is the patch.

Jianpeng

> -----Original Message-----
> From: ceph-devel-owner@xxxxxxxxxxxxxxx
> [mailto:ceph-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Sage Weil
> Sent: Monday, August 25, 2014 10:15 AM
> To: Ma, Jianpeng
> Cc: Mark Kirkwood; Somnath Roy; Samuel Just (sam.just@xxxxxxxxxxx);
> ceph-devel@xxxxxxxxxxxxxxx
> Subject: RE: Deadlock in ceph journal
> 
> 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

Attachment: 0001-os-FileJournal-Before-write_thread_entry-exit-using-.patch
Description: 0001-os-FileJournal-Before-write_thread_entry-exit-using-.patch


[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