linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: andros@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [[PATCH resend] 5/6] PYNFS: add mdsthreshold to file layout server
Date: Mon, 4 Jun 2012 11:21:52 -0400	[thread overview]
Message-ID: <CADnza44LrGcJAJnyD33ARtxJOPB7Bb+k6YbWwcjtt0Hdg9Gnxw@mail.gmail.com> (raw)
In-Reply-To: <1338329489-29178-6-git-send-email-andros@netapp.com>

On Tue, May 29, 2012 at 6:11 PM,  <andros@netapp.com> wrote:
> From: Andy Adamson <andros@netapp.com>
>
> NOTE: values are hard coded and apply to all files. Edit nfs4server.py to
> change the values.
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  nfs4.1/fs.py      |    9 ++++++++-
>  nfs4.1/nfs4lib.py |    2 +-
>  2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/nfs4.1/fs.py b/nfs4.1/fs.py
> index 2d92d77..c0f18fa 100644
> --- a/nfs4.1/fs.py
> +++ b/nfs4.1/fs.py
> @@ -1,6 +1,6 @@
>  from nfs4state import FileState
>  from nfs4_const import *
> -from nfs4_type import fsid4, layout4, layout_content4, nfsv4_1_file_layout4
> +from nfs4_type import fsid4, layout4, layout_content4, nfsv4_1_file_layout4, mdsthreshold4, threshold_item4
>  import nfs4lib
>  from nfs4lib import NFS4Error
>  import struct
> @@ -1429,6 +1429,13 @@ class FileLayoutFS(FileSystem):
>         self.fattr4_maxread = 8192
>         self.fattr4_supported_attrs |= 1 << FATTR4_MAXWRITE
>         self.fattr4_supported_attrs |= 1 << FATTR4_MAXREAD
> +        threshold_item4.thi_layout_type = LAYOUT4_NFSV4_1_FILES
> +        # set mdsthreashold read_size, read_iosize and write_iosize
> +        threshold_item4.thi_hintset = nfs4lib.list2bitmap([0, 2, 3])
> +        threshold_item4.thi_hintlist = struct.pack('!QQQ',512,512,512)

This is buggy.  You are modifying the class, not an instance of the class.

> +        mdsthreshold4.mth_hints = [threshold_item4]
> +        self.fattr4_mdsthreshold = mdsthreshold4
> +        self.fattr4_supported_attrs |= 1 << FATTR4_MDSTHRESHOLD
>         self.sync(self.root, FILE_SYNC4)
>
>     def attach_to_server(self, server):
> diff --git a/nfs4.1/nfs4lib.py b/nfs4.1/nfs4lib.py
> index 82045a7..a380cce 100644
> --- a/nfs4.1/nfs4lib.py
> +++ b/nfs4.1/nfs4lib.py
> @@ -676,7 +676,7 @@ attr_info = { FATTR4_SUPPORTED_ATTRS : A("r", "fs"),
>               FATTR4_LAYOUT_BLKSIZE : A("r", "fs"),
>               FATTR4_LAYOUT_ALIGNMENT : A("r", "obj"),
>               FATTR4_FS_LOCATIONS_INFO : A("r", "fs"),
> -              FATTR4_MDSTHRESHOLD : A("r", "obj"),
> +              FATTR4_MDSTHRESHOLD : A("r", "fs"),

What is the justification for this?  RFC 5661 lists is as a per object
attribute.

Fred

>               FATTR4_RETENTION_GET : A("r", "obj"),
>               FATTR4_RETENTION_SET : A("w", "obj"),
>               FATTR4_RETENTEVT_GET : A("r", "obj"),
> --
> 1.7.7.6
>
> --
> 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-06-04 15:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 22:11 [[PATCH resend] 0/6] PYNFS various patches andros
2012-05-29 22:11 ` [[PATCH resend] 1/6] PYNFS rpc drop fix andros
2012-05-29 22:11 ` [[PATCH resend] 2/6] PYNFS fix rpcgen andros
2012-06-01 22:01   ` Adamson, Dros
2012-05-29 22:11 ` [[PATCH resend] 3/6] PYNFS use loopback addresses for MDS<->DS communication andros
2012-05-29 22:11 ` [[PATCH resend] 4/6] PYNFS use requested iomode on layoutget andros
2012-05-29 22:11 ` [[PATCH resend] 5/6] PYNFS: add mdsthreshold to file layout server andros
2012-06-04 15:21   ` Fred Isaman [this message]
2012-05-29 22:11 ` [[PATCH resend] 6/6] PYNFS implement FREE_STATEID and TEST_STATEID operations andros

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=CADnza44LrGcJAJnyD33ARtxJOPB7Bb+k6YbWwcjtt0Hdg9Gnxw@mail.gmail.com \
    --to=iisaman@netapp.com \
    --cc=andros@netapp.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).