All of lore.kernel.org
 help / color / mirror / Atom feed
* [Lustre-devel] The good usage of lustre *_thread_info structure
@ 2011-03-25 22:27 Aurélien Degrémont
  2011-03-26  0:05 ` wangdi
  2011-03-26  7:52 ` Nikita Danilov
  0 siblings, 2 replies; 5+ messages in thread
From: Aurélien Degrémont @ 2011-03-25 22:27 UTC (permalink / raw)
  To: lustre-devel

Hello

Doing some coding in Lustre, I'm wondering for a while was it the 
correct usage of thread_info structure like mdt_thread_info or 
mdd_thread_info.
They contain pre-allocated data or pointer to pass this between function 
call and layer without overloading the stack.
My concern is: if a function decide to use of them to store some of its 
data, how can it be sure that it was not used by an upper layer or a 
calling function?
How can I be sure it is safe to use them?

By example :

struct mdt_thread_info {
    ...
         /*
          * Object attributes.
          */
         struct md_attr             mti_attr;
     ...
}

A function in MDT layer could decide it will use this structure 
(mti_attr) for its own need, then it will call several functions that 
could have the same need. How can those functions know that they can or 
cannot re-use this structure? Same issues for pointers.

Thanks for any help

Aur?lien

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-26 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 22:27 [Lustre-devel] The good usage of lustre *_thread_info structure Aurélien Degrémont
2011-03-26  0:05 ` wangdi
2011-03-26 14:22   ` Aurélien Degrémont
2011-03-26 14:38     ` Nikita Danilov
2011-03-26  7:52 ` Nikita Danilov

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.