All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	linux-fsdevel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 2/2] zonefs: use zone-append for AIO as well
Date: Mon, 20 Jul 2020 15:45:49 +0200	[thread overview]
Message-ID: <20200720134549.GB3342@lst.de> (raw)
In-Reply-To: <20200720132118.10934-3-johannes.thumshirn@wdc.com>

On Mon, Jul 20, 2020 at 10:21:18PM +0900, Johannes Thumshirn wrote:
> On a successful completion, the position the data is written to is
> returned via AIO's res2 field to the calling application.

That is a major, and except for this changelog, undocumented ABI
change.  We had the whole discussion about reporting append results
in a few threads and the issues with that in io_uring.  So let's
have that discussion there and don't mix it up with how zonefs
writes data.  Without that a lot of the boilerplate code should
also go away.

> -	if (zi->i_ztype == ZONEFS_ZTYPE_SEQ &&
> -	    (ret > 0 || ret == -EIOCBQUEUED)) {
> +
> +	if (ret > 0 || ret == -EIOCBQUEUED) {
>  		if (ret > 0)
>  			count = ret;
>  		mutex_lock(&zi->i_truncate_mutex);

Don't we still need the ZONEFS_ZTYPE_SEQ after updating count, but
before updating i_wpoffset?  Also how is this related to the rest
of the patch?

> @@ -1580,6 +1666,11 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
>  	if (!sb->s_root)
>  		goto cleanup;
>  
> +	sbi->s_dio_done_wq = alloc_workqueue("zonefs-dio/%s", WQ_MEM_RECLAIM,
> +					     0, sb->s_id);
> +	if (!sbi->s_dio_done_wq)
> +		goto cleanup;
> +

Can you reuse the sb->s_dio_done_wq pointer, and maybe even the helper
to initialize it?

  reply	other threads:[~2020-07-20 13:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 13:21 [PATCH 0/2] zonefs: use zone-append for aio with rwf append Johannes Thumshirn
2020-07-20 13:21 ` [PATCH 1/2] fs: fix kiocb ki_complete interface Johannes Thumshirn
2020-07-20 13:38   ` Christoph Hellwig
2020-07-20 13:43     ` Damien Le Moal
2020-07-20 13:47       ` Christoph Hellwig
2020-07-20 13:21 ` [PATCH 2/2] zonefs: use zone-append for AIO as well Johannes Thumshirn
2020-07-20 13:45   ` Christoph Hellwig [this message]
2020-07-20 16:48     ` Johannes Thumshirn
2020-07-21  5:54       ` Christoph Hellwig
2020-07-22 12:43         ` Johannes Thumshirn
2020-07-22 13:02           ` Damien Le Moal
2020-07-22 14:53             ` Christoph Hellwig
2020-07-22 14:51           ` Christoph Hellwig
2020-07-22 15:00             ` Johannes Thumshirn
2020-07-24 13:57             ` Kanchan Joshi
2020-07-27  3:12               ` Damien Le Moal
2020-07-21 12:43   ` Kanchan Joshi
2020-07-22 14:32     ` Johannes Thumshirn

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=20200720134549.GB3342@lst.de \
    --to=hch@lst.de \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.