mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Drokin, Oleg" <oleg.drokin@intel.com>
To: Fredrick John Berchmans <fredrickprashanth@gmail.com>
Cc: "greg@kroah.com KH" <greg@kroah.com>,
	"Dilger, Andreas" <andreas.dilger@intel.com>,
	Tao Peng <tao.peng@emc.com>,
	"hpdd-discuss@lists.01.org" <hpdd-discuss@ml01.01.org>,
	"linux-kernel@vger.kernel.org Kernel"
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: lustre use kernel socket sockopt apis
Date: Sun, 22 Jun 2014 17:42:12 +0000	[thread overview]
Message-ID: <F77528EB-4244-4F2C-8C88-88F8CBF72EC7@intel.com> (raw)
In-Reply-To: <1399085415-2910-1-git-send-email-fredrickprashanth@gmail.com>

So I came back to this patch (now part of Greg's tree)

On May 2, 2014, at 10:50 PM, Fredrick John Berchmans wrote:

> Change old way of ops->setsockopt or ops->getsockopt in kernel
> to kernel_setsockopt or kernel_getsockopt.
> 
> --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> @@ -56,21 +56,8 @@ libcfs_sock_ioctl(int cmd, unsigned long arg)
> 		CERROR ("Can't create socket: %d\n", rc);
> 		return rc;
> 	}
> -
> -	sock_filp = sock_alloc_file(sock, 0, NULL);
> -	if (IS_ERR(sock_filp)) {
> -		sock_release(sock);
> -		rc = PTR_ERR(sock_filp);
> -		goto out;
> -	}
> -
> -	set_fs(KERNEL_DS);
> -	if (sock_filp->f_op->unlocked_ioctl)
> -		rc = sock_filp->f_op->unlocked_ioctl(sock_filp, cmd, arg);
> -	set_fs(oldmm);
> -
> -	fput(sock_filp);
> -out:
> +	rc = kernel_sock_ioctl(sock, cmd, arg);
> +	sock_release(sock);
> 	return rc;
> }

This part totally breaks lustre, we use this to also call things like SIOCGIFCONF that are not available from socket proto_ops because this is really coming from dev_ioctl and I do not see any better way to access it.
So I'd like this to be reverted or if there is a better way to access this, I am interested to learn it.

Bye,
    Oleg

           reply	other threads:[~2014-06-22 17:42 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1399085415-2910-1-git-send-email-fredrickprashanth@gmail.com>]

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=F77528EB-4244-4F2C-8C88-88F8CBF72EC7@intel.com \
    --to=oleg.drokin@intel.com \
    --cc=andreas.dilger@intel.com \
    --cc=fredrickprashanth@gmail.com \
    --cc=greg@kroah.com \
    --cc=hpdd-discuss@ml01.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tao.peng@emc.com \
    /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

all inboxes | Powered by JetHome®