[lustre-discuss] kernel 5.10 on RHEL8 and lustre-client kind of working

2021-05-03 Thread Andrej Filipcic via lustre-discuss


Hi,

I compiled the master from today (commit 
0b7ddf32e336b06d459880faf9831db43ffae9cf) on 5.10.34 kernel with mpi 
support (RHEL8.3 otherwise), and it seems to work properly for me. I 
needed to do the following changes, while cross-checking LU-14195


diff --git a/lnet/lnet/lib-socket.c b/lnet/lnet/lib-socket.c
index 4a86114ecf..1412d9deb0 100644
--- a/lnet/lnet/lib-socket.c
+++ b/lnet/lnet/lib-socket.c
@@ -343,9 +343,10 @@ struct socket *
 lnet_sock_listen(int local_port, int backlog, struct net *ns)
 {
    struct socket *sock;
-   mm_segment_t oldfs;
+   //mm_segment_t oldfs;
    int val = 0;
    int rc;
+   sockptr_t sval;

    sock = lnet_sock_create(-1, NULL, local_port, ns);
    if (IS_ERR(sock)) {
@@ -360,11 +361,13 @@ lnet_sock_listen(int local_port, int backlog, 
struct net *ns)

 * This is the default, but it can be overridden so
 * we force it back.
 */
-   oldfs = get_fs();
-   set_fs(KERNEL_DS);
+   //oldfs = get_fs();
+   //set_fs(KERNEL_DS);
+   //sock->ops->setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+   //    (char __user __force *) , sizeof(val));
    sock->ops->setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
- (char __user __force *) , sizeof(val));
-   set_fs(oldfs);
+  sval, sizeof(val));
+   //set_fs(oldfs);

    rc = kernel_listen(sock, backlog);
    if (rc == 0)

With this version, the client works quite fine over o2ib (Mellanox 
drivers) with DDN Lustre servers  2.12.6, tested with several writes, 
unpacking and compiling kernel in lustre etc...


Can somebody please tell  if the fixes above are correct, or if there is 
any danger in using the master for clients in production?


Best regards,
Andrej

--
_
   prof. dr. Andrej Filipcic,   E-mail: andrej.filip...@ijs.si
   Department of Experimental High Energy Physics - F9
   Jozef Stefan Institute, Jamova 39, P.o.Box 3000
   SI-1001 Ljubljana, Slovenia
   Tel.: +386-1-477-3674Fax: +386-1-425-7074
-

___
lustre-discuss mailing list
lustre-discuss@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


[Lustre-discuss] inconsistent client behavior when creating an empty directory

2011-08-09 Thread Andrej Filipcic

Hi,

the following code does not work as expected:
-
#include sys/stat.h
#include errno.h
#include stdio.h

int main(int argc, char** argv) {

  int rc;
  rc=mkdir(argv[1],S_IRWXU);
  if(rc) perror(failed create dir);
  chown(argv[1],4103,4100);

  struct stat buf;
  /* stat(argv[1],buf); */

  setresuid(0,4103,4100);
  rc=mkdir(argv[1],S_IRWXU);
  if(rc) perror(failed create dir as user);
}
-

initial status:

# ls -ld /lustre/test
drwxr-xr-x 2 root root 4096 Aug  9 14:59 /lustre/test
# ls -l /lustre/test
total 0

1) running the test program:

# /tmp/test /lustre/test/testdir
failed create dir as user: Permission denied
# ls -l /lustre/test
total 4
drwx-- 2 griduser03 grid 4096 Aug  9 15:02 testdir

griduser03, grid correspond to uid=4103,gid=4100


2) running the test program, but with uncommented stat call:
# /tmp/test /lustre/test/testdir
failed create dir as user: File exists
# ls -l /lustre/test
total 4
drwx-- 2 griduser03 grid 4096 Aug  9 15:04 testdir


The code first makes the testdir as root and changes the ownership to uid 4103. 
Then it tries to (re)create the same dir with the user privileges. 

If stat is called, the code behaves as expected (case 2), but if not (case 
1), the second mkdir should return EEXIST and not EACCES. Is this behavior 
expected or is it a client bug? The client runs lustre 1.8.6.

The code just illustrates, what is actually used in a complex software.

Andrej

-- 
_
   prof. dr. Andrej Filipcic,   E-mail: andrej.filip...@ijs.si
   Department of Experimental High Energy Physics - F9
   Jozef Stefan Institute, Jamova 39, P.o.Box 3000
   SI-1001 Ljubljana, Slovenia
   Tel.: +386-1-477-3674Fax: +386-1-477-3166
-

___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss


Re: [Lustre-discuss] Lustre kernel port to Gentoo (or patchless Gentoo clients)

2010-03-12 Thread Andrej Filipcic
On Friday 12 March 2010 16:07:23 Bradley Voogel wrote:
 Greetings,
 
 I was wondering if anyone has had success working with Lustre on Gentoo
 from either a MDS, OSS or patchless client perspective.

patchless client works fine with 2.6.30-gentoo-r6
(1k core cluster)

Cheers,
Andrej

 
 I'll take my answer off the air
 
 Thanks
 -Brad
 
 
 Brad Voogel
 Data Center and Storage US
 Direct: +01 203 926 3166
 Mobile: +01 203 747 9309
 2 Corporate Dr Shelton CT, 06484 USA
 bradley.voo...@nasdaqomx.commailto:bradley.voo...@nasdaqomx.com
 www.nasdaqomx.comhttp://www.nasdaqomx.com

-- 
_
   prof. dr. Andrej Filipcic,   E-mail: andrej.filip...@ijs.si
   Department of Experimental High Energy Physics - F9
   Jozef Stefan Institute, Jamova 39, P.o.Box 3000
   SI-1001 Ljubljana, Slovenia
   Tel.: +386-1-477-3674Fax: +386-1-477-3166
-
___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss