robinhood icon indicating copy to clipboard operation
robinhood copied to clipboard

lustre: Correctly identify the IOCTL in case of failure.

Open arshad512 opened this issue 1 year ago • 2 comments

In case of failure returned by IOCTL, under lustre_mds_stat_by_fid() and lustre_mds_stat() the default case was printing the new IOCTL string regardless. This would be incorrect in case OLD IOCTL is called. This patch fixes the above issue, buy rechecking IOCTL in current use, assigning the correct string then calling DisplayLog() to print the string.

Change-Id: I3d493b75f599aae7b7ba2815451a1ae8f534a282

arshad512 avatar Nov 15 '23 14:11 arshad512

Thank your for the contribution.

Given that IOC_MDC_GETFILEINFO refers to different ioctls depending on the Lustre version, and IOC_MDC_GETFILEINFO_OLD may or may not exist, or may also change in the future, what about just tracing the ioctl name as "IOC_MDC_GETFILEINFO_V1" which precisely refer to what is called and won't change? Would it be satisfying for you?

tl-cea avatar Aug 30 '24 13:08 tl-cea

Thanks for the review!

Given that IOC_MDC_GETFILEINFO refers to different ioctls depending on the Lustre version, and

Ack

IOC_MDC_GETFILEINFO_OLD may or may not exist, or may also change in the future,

Ack. I think this is already being removed in Lustre master.

what about just tracing the ioctl name as "IOC_MDC_GETFILEINFO_V1" which precisely refer to what is called

Ack

and won't change?

I would not know. At least not in very near future :-)

Would it be satisfying for you?

Ack. I agree with you.

arshad512 avatar Aug 30 '24 16:08 arshad512

Modified version pushed here: https://review.gerrithub.io/c/cea-hpc/robinhood/+/1201865

tl-cea avatar Sep 26 '24 15:09 tl-cea