Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 2/3] zonefs: open/close zone on file open/close
Date: Mon, 7 Sep 2020 09:52:41 +0000	[thread overview]
Message-ID: <982153fc92ede2b652e24cd022180e59dafab9b1.camel@wdc.com> (raw)
In-Reply-To: <SN4PR0401MB3598E132449AAF0432C909E19B280@SN4PR0401MB3598.namprd04.prod.outlook.com>

On Mon, 2020-09-07 at 08:49 +0000, Johannes Thumshirn wrote:
> On 07/09/2020 05:06, Damien Le Moal wrote:
> > May be you meant something like "leave a zone not active after a truncate when
> > the zone file is open for writing" ?
> 
> No I meant, we shouldn't decrement the 's_open_zones' count on truncate to 0
> or full, when a zone is still opened for write. Because if we do, another thread
> could open the last available open zone and the application won't be able to write
> to a previously opened zone, if that makes sense.

I understood that, but the "active writers" is hard to
decode/understand. So may be just replace that with "as the file may
still be open for writing, e.g. the user called ftruncate(). If the
zone file is not open and a process does a truncate(), then no close
operation is needed." 


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2020-09-07  9:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 11:23 [PATCH 0/3] zonefs: introduce -o explicit-open mount option Johannes Thumshirn
2020-09-04 11:23 ` [PATCH 1/3] zonefs: introduce helper for zone management Johannes Thumshirn
2020-09-07  2:55   ` Damien Le Moal
2020-09-04 11:23 ` [PATCH 2/3] zonefs: open/close zone on file open/close Johannes Thumshirn
2020-09-07  3:06   ` Damien Le Moal
2020-09-07  8:49     ` Johannes Thumshirn
2020-09-07  9:52       ` Damien Le Moal [this message]
2020-09-07  4:32   ` Damien Le Moal
2020-09-04 11:23 ` [PATCH 3/3] zonefs: document the explicit-open mount option Johannes Thumshirn
2020-09-04 15:17   ` Randy Dunlap
2020-09-07  3:09   ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=982153fc92ede2b652e24cd022180e59dafab9b1.camel@wdc.com \
    --to=damien.lemoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --subject='Re: [PATCH 2/3] zonefs: open/close zone on file open/close' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).