From: Kanchan Joshi <joshi.k@samsung.com> To: axboe@kernel.dk, viro@zeniv.linux.org.uk, bcrl@kvack.org Cc: willy@infradead.org, hch@infradead.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, SelvaKumar S <selvakuma.s1@samsung.com>, Kanchan Joshi <joshi.k@samsung.com>, Nitesh Shetty <nj.shetty@samsung.com>, Javier Gonzalez <javier.gonz@samsung.com> Subject: [PATCH v4 2/6] fs: change ki_complete interface to support 64bit ret2 Date: Fri, 24 Jul 2020 21:19:18 +0530 Message-ID: <1595605762-17010-3-git-send-email-joshi.k@samsung.com> (raw) In-Reply-To: <1595605762-17010-1-git-send-email-joshi.k@samsung.com> From: SelvaKumar S <selvakuma.s1@samsung.com> kiocb->ki_complete(...,long ret2) - change ret2 to long long. This becomes handy to return 64bit written-offset with appending write. Change callers using ki_complete prototype. Signed-off-by: SelvaKumar S <selvakuma.s1@samsung.com> Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com> Signed-off-by: Javier Gonzalez <javier.gonz@samsung.com> --- drivers/block/loop.c | 2 +- drivers/nvme/target/io-cmd-file.c | 2 +- drivers/target/target_core_file.c | 2 +- fs/aio.c | 2 +- fs/io_uring.c | 4 ++-- fs/overlayfs/file.c | 2 +- include/linux/fs.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index c33bbbf..d41dcbd 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -512,7 +512,7 @@ static void lo_rw_aio_do_completion(struct loop_cmd *cmd) blk_mq_complete_request(rq); } -static void lo_rw_aio_complete(struct kiocb *iocb, long ret, long ret2) +static void lo_rw_aio_complete(struct kiocb *iocb, long ret, long long ret2) { struct loop_cmd *cmd = container_of(iocb, struct loop_cmd, iocb); diff --git a/drivers/nvme/target/io-cmd-file.c b/drivers/nvme/target/io-cmd-file.c index 0abbefd..ae6e797 100644 --- a/drivers/nvme/target/io-cmd-file.c +++ b/drivers/nvme/target/io-cmd-file.c @@ -123,7 +123,7 @@ static ssize_t nvmet_file_submit_bvec(struct nvmet_req *req, loff_t pos, return call_iter(iocb, &iter); } -static void nvmet_file_io_done(struct kiocb *iocb, long ret, long ret2) +static void nvmet_file_io_done(struct kiocb *iocb, long ret, long long ret2) { struct nvmet_req *req = container_of(iocb, struct nvmet_req, f.iocb); u16 status = NVME_SC_SUCCESS; diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 7143d03..387756f2 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -243,7 +243,7 @@ struct target_core_file_cmd { struct kiocb iocb; }; -static void cmd_rw_aio_complete(struct kiocb *iocb, long ret, long ret2) +static void cmd_rw_aio_complete(struct kiocb *iocb, long ret, long long ret2) { struct target_core_file_cmd *cmd; diff --git a/fs/aio.c b/fs/aio.c index 7ecddc2..7218c8b 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1418,7 +1418,7 @@ static void aio_remove_iocb(struct aio_kiocb *iocb) spin_unlock_irqrestore(&ctx->ctx_lock, flags); } -static void aio_complete_rw(struct kiocb *kiocb, long res, long res2) +static void aio_complete_rw(struct kiocb *kiocb, long res, long long res2) { struct aio_kiocb *iocb = container_of(kiocb, struct aio_kiocb, rw); diff --git a/fs/io_uring.c b/fs/io_uring.c index 155f3d8..7809ab2 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1958,7 +1958,7 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res) __io_cqring_add_event(req, res, cflags); } -static void io_complete_rw(struct kiocb *kiocb, long res, long res2) +static void io_complete_rw(struct kiocb *kiocb, long res, long long res2) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); @@ -1966,7 +1966,7 @@ static void io_complete_rw(struct kiocb *kiocb, long res, long res2) io_put_req(req); } -static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) +static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long long res2) { struct io_kiocb *req = container_of(kiocb, struct io_kiocb, rw.kiocb); diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 01820e6..614b834 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -268,7 +268,7 @@ static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) kmem_cache_free(ovl_aio_request_cachep, aio_req); } -static void ovl_aio_rw_complete(struct kiocb *iocb, long res, long res2) +static void ovl_aio_rw_complete(struct kiocb *iocb, long res, long long res2) { struct ovl_aio_req *aio_req = container_of(iocb, struct ovl_aio_req, iocb); diff --git a/include/linux/fs.h b/include/linux/fs.h index ef13df4..a6a5f41 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -327,7 +327,7 @@ struct kiocb { randomized_struct_fields_start loff_t ki_pos; - void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); + void (*ki_complete)(struct kiocb *iocb, long ret, long long ret2); void *private; int ki_flags; u16 ki_hint; -- 2.7.4
next prev parent reply index Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20200724155244epcas5p2902f57e36e490ee8772da19aa9408cdc@epcas5p2.samsung.com> 2020-07-24 15:49 ` [PATCH v4 0/6] zone-append support in io-uring and aio Kanchan Joshi [not found] ` <CGME20200724155258epcas5p1a75b926950a18cd1e6c8e7a047e6c589@epcas5p1.samsung.com> 2020-07-24 15:49 ` [PATCH v4 1/6] fs: introduce FMODE_ZONE_APPEND and IOCB_ZONE_APPEND Kanchan Joshi 2020-07-24 16:34 ` Jens Axboe 2020-07-26 15:18 ` Christoph Hellwig 2020-07-28 1:49 ` Matthew Wilcox 2020-07-28 7:26 ` Christoph Hellwig [not found] ` <CGME20200724155324epcas5p18e1d3b4402d1e4a8eca87d0b56a3fa9b@epcas5p1.samsung.com> 2020-07-24 15:49 ` Kanchan Joshi [this message] 2020-07-26 15:18 ` [PATCH v4 2/6] fs: change ki_complete interface to support 64bit ret2 Christoph Hellwig [not found] ` <CGME20200724155329epcas5p345ba6bad0b8fe18056bb4bcd26c10019@epcas5p3.samsung.com> 2020-07-24 15:49 ` [PATCH v4 3/6] uio: return status with iov truncation Kanchan Joshi [not found] ` <CGME20200724155341epcas5p15bfc55927f2abb60f19784270fe8e377@epcas5p1.samsung.com> 2020-07-24 15:49 ` [PATCH v4 4/6] block: add zone append handling for direct I/O path Kanchan Joshi 2020-07-26 15:19 ` Christoph Hellwig [not found] ` <CGME20200724155346epcas5p2cfb383fe9904a45280c6145f4c13e1b4@epcas5p2.samsung.com> 2020-07-24 15:49 ` [PATCH v4 5/6] block: enable zone-append for iov_iter of bvec type Kanchan Joshi 2020-07-26 15:20 ` Christoph Hellwig [not found] ` <CGME20200724155350epcas5p3b8f1d59eda7f8fbb38c828f692d42fd6@epcas5p3.samsung.com> 2020-07-24 15:49 ` [PATCH v4 6/6] io_uring: add support for zone-append Kanchan Joshi 2020-07-24 16:29 ` Jens Axboe 2020-07-27 19:16 ` Kanchan Joshi 2020-07-27 20:34 ` Jens Axboe 2020-07-30 16:08 ` Pavel Begunkov 2020-07-30 16:13 ` Jens Axboe 2020-07-30 16:26 ` Pavel Begunkov 2020-07-30 17:16 ` Jens Axboe 2020-07-30 17:38 ` Pavel Begunkov 2020-07-30 17:51 ` Kanchan Joshi 2020-07-30 17:54 ` Jens Axboe 2020-07-30 18:25 ` Kanchan Joshi 2020-07-31 6:42 ` Damien Le Moal 2020-07-31 6:45 ` hch 2020-07-31 6:59 ` Damien Le Moal 2020-07-31 7:58 ` Kanchan Joshi 2020-07-31 8:14 ` Damien Le Moal 2020-07-31 9:14 ` hch 2020-07-31 9:34 ` Damien Le Moal 2020-07-31 9:41 ` hch 2020-07-31 10:16 ` Damien Le Moal 2020-07-31 12:51 ` hch 2020-07-31 13:08 ` hch 2020-07-31 15:07 ` Kanchan Joshi 2020-08-05 7:35 ` Damien Le Moal 2020-08-14 8:14 ` hch 2020-08-14 8:27 ` Damien Le Moal 2020-08-14 12:04 ` hch 2020-08-14 12:20 ` Damien Le Moal 2020-09-07 7:01 ` Kanchan Joshi 2020-09-08 15:18 ` hch 2020-09-24 17:19 ` Kanchan Joshi 2020-09-25 2:52 ` Damien Le Moal 2020-09-28 18:58 ` Kanchan Joshi 2020-09-29 1:24 ` Damien Le Moal 2020-09-29 18:49 ` Kanchan Joshi 2020-07-31 9:38 ` Kanchan Joshi 2020-07-31 7:08 ` Kanchan Joshi 2020-07-30 15:57 ` Pavel Begunkov
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=1595605762-17010-3-git-send-email-joshi.k@samsung.com \ --to=joshi.k@samsung.com \ --cc=Damien.LeMoal@wdc.com \ --cc=asml.silence@gmail.com \ --cc=axboe@kernel.dk \ --cc=bcrl@kvack.org \ --cc=hch@infradead.org \ --cc=io-uring@vger.kernel.org \ --cc=javier.gonz@samsung.com \ --cc=linux-aio@kvack.org \ --cc=linux-api@vger.kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=nj.shetty@samsung.com \ --cc=selvakuma.s1@samsung.com \ --cc=viro@zeniv.linux.org.uk \ --cc=willy@infradead.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
Linux-api Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-api/0 linux-api/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-api linux-api/ https://lore.kernel.org/linux-api \ linux-api@vger.kernel.org public-inbox-index linux-api Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-api AGPL code for this site: git clone https://public-inbox.org/public-inbox.git