[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef4cc431-4cc4-eb39-735d-0b3b3759abed@redhat.com>
Date: Mon, 22 May 2023 09:53:28 +0800
From: Xiubo Li <xiubli@...hat.com>
To: David Howells <dhowells@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>, Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
David Hildenbrand <david@...hat.com>,
Jason Gunthorpe <jgg@...dia.com>,
Logan Gunthorpe <logang@...tatee.com>,
Hillf Danton <hdanton@...a.com>,
Christian Brauner <brauner@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Christoph Hellwig <hch@....de>,
Ilya Dryomov <idryomov@...il.com>, ceph-devel@...r.kernel.org
Subject: Re: [PATCH v20 13/32] ceph: Provide a splice-read stub
On 5/19/23 17:24, David Howells wrote:
> Xiubo Li <xiubli@...hat.com> wrote:
>
>>> + ret = ceph_get_caps(in, CEPH_CAP_FILE_RD, want, -1, &got);
>>> + if (ret < 0) {
>>> + ceph_end_io_read(inode);
>>> + return ret;
>>> + }
>>> +
>>> + if ((got & (CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO)) == 0) {
>>> + dout("splice_read/sync %p %llx.%llx %llu~%zu got cap refs on %s\n",
>>> + inode, ceph_vinop(inode), *ppos, len,
>>> + ceph_cap_string(got));
>>> +
>>> + ceph_end_io_read(inode);
>>> + return direct_splice_read(in, ppos, pipe, len, flags);
>> Shouldn't we release cap ref before returning here ?
> Ummm... Even if we got no caps?
No, at least we have got the 'need' caps: CEPH_CAP_FILE_RD once here.
I saw you have updated this and will check it.
Thanks
- Xiubo
>
> David
>
Powered by blists - more mailing lists