From: Boaz Harrosh <bharrosh@panasas.com>
To: Fred Isaman <iisaman@netapp.com>
Cc: Benny Halevy <bhalevy@panasas.com>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
NFS list <linux-nfs@vger.kernel.org>,
open-osd <osd-dev@open-osd.org>
Subject: Re: [PATCH 16/23] pnfs: support for non-rpc layout drivers
Date: Mon, 23 May 2011 20:56:42 +0300 [thread overview]
Message-ID: <4DDA9FDA.40802@panasas.com> (raw)
In-Reply-To: <BANLkTikj_h-1LK1ZWVsQQuwZ6-v2uB7QpQ@mail.gmail.com>
On 05/23/2011 05:54 PM, Fred Isaman wrote:
> On Mon, May 23, 2011 at 12:22 AM, Boaz Harrosh <bharrosh@panasas.com> wrote:
>> On 05/22/2011 10:40 PM, Benny Halevy wrote:
>>>> +/*
>>>> + * Called by non rpc-based layout drivers
>>>> + */
>>>> +int
>>>> +pnfs_ld_write_done(struct nfs_write_data *data)
>>>> +{
>>>> + int status;
>>>> +
>>>
>>>
>>>> + if (!data->pnfs_error) {
>>>> + pnfs_set_layoutcommit(data);
>>>
>>> We need at least to set data->task.tk_status to 0
>>
>> I guess it does not hurt, but we never touched it, is it garbage?
>>
>>>
>>>> + data->mds_ops->rpc_call_done(&data->task, data);
>>>> + data->mds_ops->rpc_release(data);
>>>
>>> Where's the put_lseg you had in PATCH 10/13?
>>>
>>> Benny
>>
>> That was the bug. Please see my SQUASHME patches I explained
>> it all there.
>>
>>>
>>>> + return 0;
>>>> + }
>>>> +
>>>> + put_lseg(data->lseg);
>>>> + data->lseg = NULL;
>>
>> I'm not sure it is needed here as well.
>> Fred! please see this code
>> We know that the lseg is put in nfs_writedata_release()
>> Does the below nfs_initiate_write() retakes the ref.
>> If it does we need the put here. If it does not we
>> don't need here.
>>
>
> nfs_initiate_read/write() did not take any reference to the lseg.
> This was done immediately prior in the nfs_read/write_rpcsetup
> functions.
>
Thanks, Yes, you are right. I actually tested that and I saw the bug.
The put here in the error case needs to be removed as well.
Benny I'll send a squashme. (I inserted simulated errors to test the error path)
> Note however that the commit code takes references in the file driver code.
>
We don't do commit in objects yet, and Benny did not implement the
pnfs_ld_commit_done, yet. But we will need it eventually.
I hope that the ref taken by the file driver is balance by the driver
and not by generic code, right? If not, we might need to fix that somewhere.
> Fred
>
Thanks
>> Boaz
>>
>>>> + dprintk("%s: pnfs_error=%d, retry via MDS\n", __func__,
>>>> + data->pnfs_error);
>>>> + status = nfs_initiate_write(data, NFS_CLIENT(data->inode),
>>>> + data->mds_ops, NFS_FILE_SYNC);
>>>> + return status ? : -EAGAIN;
>>>> +}
next prev parent reply other threads:[~2011-05-23 17:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-22 16:43 [PATCHSET V4 00/23 boaz] pnfs for 2.6.40 Boaz Harrosh
2011-05-22 16:47 ` [PATCH 01/23] pnfs: CB_NOTIFY_DEVICEID Boaz Harrosh
2011-05-22 16:47 ` [PATCH 02/23] pnfs: Use byte-range for layoutget Boaz Harrosh
2011-05-22 16:47 ` [PATCH 03/23] pnfs: align layoutget requests on page boundaries Boaz Harrosh
2011-05-22 16:48 ` [PATCH 04/23] pnfs: Use byte-range for cb_layoutrecall Boaz Harrosh
2011-05-22 16:48 ` [PATCH 05/23] pnfs: client stats Boaz Harrosh
2011-05-22 16:48 ` [PATCH 06/23] pnfs: resolve header dependency in pnfs.h Boaz Harrosh
2011-05-22 16:49 ` [PATCH 07/23] pnfs-obj: objlayoutdriver module skeleton Boaz Harrosh
2011-05-22 16:49 ` [PATCH 08/23] pnfs-obj: pnfs_osd XDR definitions Boaz Harrosh
2011-05-22 16:49 ` [PATCH 09/23] pnfs-obj: pnfs_osd XDR client implementation Boaz Harrosh
2011-05-22 16:50 ` [PATCH 10/23] pnfs-obj: decode layout, alloc/free lseg Boaz Harrosh
2011-05-22 16:50 ` [PATCH 11/23] pnfs: per mount layout driver private data Boaz Harrosh
2011-05-22 16:50 ` [PATCH 12/23] pnfs-obj: objio_osd device information retrieval and caching Boaz Harrosh
2011-05-22 16:51 ` [PATCH 13/23] pnfs: set/unset layoutdriver Boaz Harrosh
2011-05-22 16:51 ` [PATCH 14/23] pnfs: alloc and free layout_hdr layoutdriver methods Boaz Harrosh
2011-05-22 16:51 ` [PATCH 15/23] pnfs-obj: define per-mount and per-inode private structures Boaz Harrosh
2011-05-22 16:52 ` [PATCH 16/23] pnfs: support for non-rpc layout drivers Boaz Harrosh
2011-05-22 19:40 ` Benny Halevy
2011-05-22 23:25 ` Benny Halevy
2011-05-23 4:22 ` Boaz Harrosh
2011-05-23 14:54 ` Fred Isaman
2011-05-23 17:56 ` Boaz Harrosh [this message]
2011-05-22 16:52 ` [PATCH 17/23] pnfs-obj: osd raid engine read/write implementation Boaz Harrosh
2011-05-22 16:52 ` [PATCH 18/23] pnfs: layoutreturn Boaz Harrosh
2011-05-22 16:52 ` [PATCH 19/23] pnfs: layoutret_on_setattr Boaz Harrosh
2011-05-22 16:53 ` [PATCH 20/23] pnfs: encode_layoutreturn Boaz Harrosh
2011-05-22 16:53 ` [PATCH 21/23] pnfs-obj: report errors and .encode_layoutreturn Implementation Boaz Harrosh
2011-05-22 16:53 ` [PATCH 22/23] pnfs: encode_layoutcommit Boaz Harrosh
2011-05-22 16:54 ` [PATCH 23/23] pnfs-obj: objlayout_encode_layoutcommit implementation Boaz Harrosh
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=4DDA9FDA.40802@panasas.com \
--to=bharrosh@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bhalevy@panasas.com \
--cc=iisaman@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=osd-dev@open-osd.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.