Re: [PATCH v8 5/6] nfsd: add the infrastructure to handle the cld upcall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



05.03.2012 16:42, Jeff Layton пишет:


Would be great to replace hard-coded cld_pipe here with a passed one.
For example, put this cld_pipe on cld_msg structure.
And initialize this pointer (hard-coded value for now) below in
nfsd4_cld_create() and all other places where alloc_cld_upcall() is called.

BTW, maybe allocate this struct cld_upcall per NFS client somehow? And thus get
rid of alloc-free calls?



Ok, I think I must have misunderstood what you meant when you said no
per-net ops required. I'll respin and see if I can get closer to what
you intended.

Since most of the upcalls are infrequent and come from nfsd threads,
the number of calls in flight will always be less than the order of the
number of nfsd threads. That value may be much less than the number of
nfs4_clients, so we're probably best off allocating these dynamically.



Sure, it's up to you. Only wanna note, that this dynamic allocation in several places looks a little bit confusing to me.


Now that I've had some time to look, I think what you're probably going
to want to do eventually is to add a new per-namespace object for nfsd,
similar to struct nfs_net for the nfs client. This container will hold
the pointer to the upcall pipe as well as other objects.


Exactly.

The nfs4_client objects for nfsd will then need to be per-namespace,
and will have a pointer back to "struct nfsd_net" or whatever you end up
calling it. From that they'll be able to get the rpc_pipe pointer.


You most probably right (I'm not working on NFSd yet - so hard to be sure).

For now, I'll just hardcode init_net in the appropriate places under the
assumption that eventually you'll be able to get a rpc_pipe pointer
given a pointer to an nfs4_client struct.


Yes, thank you, Jeff.

--
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux