Skip to contentSkip to conversation

Garbage ERESTARTSYS in dlmdomain.c?

Ocfs2-devel Joel Becker 2 participants 2 messages Aug 31, 2009 OCFS2

lore
Share & tools
lore
#0 lore raw

Look at this code from dlmdomain.c:

-----------------------------------------------------------------------
/* If we're racing another node to the join, then we
* need to back off temporarily and let them
* complete. */

#define DLM_JOIN_TIMEOUT_MSECS  90000
                if (status == -EAGAIN) {
                        if (signal_pending(current)) {
                                status = -ERESTARTSYS;
                                goto bail;
                        }

                        if (total_backoff >
                            msecs_to_jiffies(DLM_JOIN_TIMEOUT_MSECS)) {
                                status = -ERESTARTSYS;
                                mlog(ML_NOTICE, "Timed out joining dlm domain "
                                     "%s after %u msecs\n", dlm->name,
                                     jiffies_to_msecs(total_backoff));
                                goto bail;
                        }

-----------------------------------------------------------------------

Why are we returning -ERESTARTSYS when there isn't a signal pending? This seems like it could totally do something weird, like have entry.S get confused.

Joel

Signature · 9 lines
"If you took all of the grains of sand in the world, and lined
 them up end to end in a row, you'd be working for the government!"
	- Mr. Interesting

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
#1 lore raw
Quoted 18 lines · Joel Becker

Look at this code from dlmdomain.c:

-----------------------------------------------------------------------
/* If we're racing another node to the join, then we
* need to back off temporarily and let them
* complete. */

#define DLM_JOIN_TIMEOUT_MSECS  90000
                if (status == -EAGAIN) {
                        if (signal_pending(current)) {
                                status = -ERESTARTSYS;
                                goto bail;
                        }

                        if (total_backoff >
                            msecs_to_jiffies(DLM_JOIN_TIMEOUT_MSECS)) {
                                status = -ERESTARTSYS;
Quoted 3 lines

Why are we returning -ERESTARTSYS when there isn't a signal pending? This seems like it could totally do something weird, like have entry.S get confused.

Yeah, I think that the timeout error should be returning -EAGAIN. It doesn't make any sense for it to be -ERESTARTSYS...

	--Mark

--
Mark Fasheh