All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v4 2/3] nfsd: Add ALLOCATE support
Date: Fri, 7 Nov 2014 16:02:14 -0500	[thread overview]
Message-ID: <545D3356.2060900@Netapp.com> (raw)
In-Reply-To: <20141107210115.GA5723@fieldses.org>

On 11/07/2014 04:01 PM, J. Bruce Fields wrote:
> On Fri, Nov 07, 2014 at 02:44:26PM -0500, Anna.Schumaker@netapp.com wrote:
>> @@ -533,6 +534,28 @@ __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp,
>>  }
>>  #endif
>>  
>> +__be32 nfsd4_vfs_fallocate(struct svc_rqst *rqstp, struct svc_fh *fhp,
>> +			   struct file *file, loff_t offset, loff_t len,
>> +			   int flags)
>> +{
>> +	__be32 err;
>> +	int error;
>> +
>> +	if (!S_ISREG(file_inode(file)->i_mode))
>> +		return nfserr_inval;
>> +
>> +	err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, NFSD_MAY_WRITE);
>> +	if (err)
>> +		return err;
>> +
>> +	error = vfs_fallocate(file, flags, offset, len);
>> +	if (!error)
>> +		error = commit_metadata(fhp);
>> +
>> +	if (error == -ENODEV)
>> +		return nfserr_inval;
> 
> 
> I don't think we need this check any more.
> 
> I'll just remove it myself as I apply if there's no objection.

Right!  Thanks for the reminder, I have no objections if you remove it :)

Anna
> 
> --b.
> 


  reply	other threads:[~2014-11-07 21:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 19:44 [PATCH v4 0/3] NFS: Add ALLOCATE and DEALLOCATE support Anna.Schumaker
2014-11-07 19:44 ` [PATCH v4 1/3] VFS: Rename do_fallocate() to vfs_fallocate() Anna.Schumaker
2014-11-07 19:44 ` [PATCH v4 2/3] nfsd: Add ALLOCATE support Anna.Schumaker
2014-11-07 21:01   ` J. Bruce Fields
2014-11-07 21:02     ` Anna Schumaker [this message]
2014-11-07 19:44 ` [PATCH v4 3/3] nfsd: Add DEALLOCATE support Anna.Schumaker
2014-11-07 21:22 ` [PATCH v4 0/3] NFS: Add ALLOCATE and " J. Bruce Fields

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=545D3356.2060900@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --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 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.