/* Input: buf: C string containing an unsigned integer value representing the new NFS blksize size: non-zero length of C string in @buf Output: On success: passed-in buffer filled with ' */
static ssize_t write_maxblksize(struct file *file, char *buf, size_t size)
/* Input: buf: C string containing an unsigned integer value representing the new NFS blksize size: non-zero length of C string in @buf Output: On success: passed-in buffer filled with ' */
static ssize_t write_maxblksize(struct file *file, char *buf, size_t size)
{
	char *mesg = buf;
	if (size > 0) {
		int bsize;
		int rv = get_int(&mesg, &bsize);
		if (rv)
			return rv;
		if (bsize < 1024)
			bsize = 1024;
		if (bsize > NFSSVC_MAXBLKSIZE)
			bsize = NFSSVC_MAXBLKSIZE;
		bsize &= ~(1024-1);
		mutex_lock(&nfsd_mutex);
		if (nfsd_serv && nfsd_serv->sv_nrthreads) {
			mutex_unlock(&nfsd_mutex);
			return -EBUSY;
		}
		nfsd_max_blksize = bsize;
		mutex_unlock(&nfsd_mutex);
	}
	return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%d\n",
							nfsd_max_blksize);
}