linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@tonian.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 4/5] pnfsd-lexp: return_on_close config option
Date: Mon, 28 May 2012 20:58:17 +0300	[thread overview]
Message-ID: <4FC3BCB9.6040604@tonian.com> (raw)
In-Reply-To: <4FC3AD59.4050703@panasas.com>

On 2012-05-28 19:52, Boaz Harrosh wrote:
> On 05/28/2012 07:09 PM, Benny Halevy wrote:
> 
>> Signed-off-by: Benny Halevy <bhalevy@tonian.com>
>> ---
>>  fs/nfsd/Kconfig      |    7 +++++++
>>  fs/nfsd/pnfsd_lexp.c |    5 +++++
>>  2 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
>> index 9d4d79b..f9b3426 100644
>> --- a/fs/nfsd/Kconfig
>> +++ b/fs/nfsd/Kconfig
>> @@ -132,3 +132,10 @@ config PNFSD_LEXP_LAYOUT_SEGMENT_SIZE
>>  	  Set simulated layout segment size.
>>  
>>  	  If unsure, say N.
>> +
>> +config PNFSD_LEXP_RETURN_ON_CLOSE
>> +	bool "Reply to LAYOUTGET with return_on_close set to true"
>> +	depends on PNFSD_LOCAL_EXPORT
>> +	default false
>> +	help
>> +	  Set return_on_close response flag.
>> diff --git a/fs/nfsd/pnfsd_lexp.c b/fs/nfsd/pnfsd_lexp.c
>> index 30d9757..33a724c 100644
>> --- a/fs/nfsd/pnfsd_lexp.c
>> +++ b/fs/nfsd/pnfsd_lexp.c
>> @@ -153,6 +153,11 @@ static int get_stripe_unit(int blocksize)
>>  	res->lg_seg.offset = 0;
>>  	res->lg_seg.length = NFS4_MAX_UINT64;
>>  #endif  /* CONFIG_PNFSD_LEXP_LAYOUT_SEGMENTS */
>> +#ifdef     CONFIG_PNFSD_LEXP_RETURN_ON_CLOSE
>> +	res->lg_return_on_close = true;
>> +#else   /* CONFIG_PNFSD_LEXP_RETURN_ON_CLOSE */
>> +	res->lg_return_on_close = false;
> 
> 
> Back to my original question. With current code this case is a BUG.
> It will leak layouts and therefore file-reference in case of a layout-get
> with open-state ID. 
> 
> So I suggest hardcoding to true until such time that we actually can
> support it

so how will you debug the leak case?
pnfsd-lexp is for testing, and the default is on.

Benny

> 
> Boaz
> 
>> +#endif  /* CONFIG_PNFSD_LEXP_RETURN_ON_CLOSE */
>>  
>>  	layout = kzalloc(sizeof(*layout), GFP_KERNEL);
>>  	if (layout == NULL) {
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-05-28 17:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  0:16 Does our Kernel PNFSD-Server supports recurring layout_get with open_state_id Boaz Harrosh
2012-05-24 12:41 ` Benny Halevy
2012-05-24 13:49   ` Boaz Harrosh
2012-05-24 13:50     ` Boaz Harrosh
2012-05-28 16:05     ` Benny Halevy
2012-05-28 16:09       ` [PATCH 1/5] pnfsd: make return_on_close state layout-global for the file/client Benny Halevy
2012-05-28 16:38         ` Boaz Harrosh
2012-05-28 16:09       ` [PATCH 2/5] SQUASHME: pnfsd: use LR_FLAG_INTERN for pnfsd_roc implicit layout return Benny Halevy
2012-05-28 16:09       ` [PATCH 3/5] pnfsd: add debug printouts to pnfsd_roc Benny Halevy
2012-05-28 16:53         ` Boaz Harrosh
2012-05-28 17:59           ` Benny Halevy
2012-05-28 16:09       ` [PATCH 4/5] pnfsd-lexp: return_on_close config option Benny Halevy
2012-05-28 16:52         ` Boaz Harrosh
2012-05-28 17:58           ` Benny Halevy [this message]
2012-05-28 18:01             ` Benny Halevy
2012-05-28 18:08               ` Benny Halevy
2012-05-28 18:05             ` Boaz Harrosh
2012-05-28 16:09       ` [PATCH 5/5] SQUASHME: pnfsd: lrs_present is false by default Benny Halevy
2012-05-28 16:36       ` Does our Kernel PNFSD-Server supports recurring layout_get with open_state_id Boaz Harrosh
2012-05-28 17:55         ` Benny Halevy
2012-05-28 18:09           ` Boaz Harrosh
2012-05-28 18:29             ` Benny Halevy
2012-05-29  7:13               ` Boaz Harrosh
2012-05-31  6:35                 ` Benny Halevy

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=4FC3BCB9.6040604@tonian.com \
    --to=bhalevy@tonian.com \
    --cc=bharrosh@panasas.com \
    --cc=linux-nfs@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 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).