Project

General

Profile

Actions

Bug #7883

closed

snoop(1m) should print locktype for NFSv4 LOCKT operation

Added by Marcel Telka over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
cmd - userland programs
Start date:
2017-02-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

The snoop(1m) does not print the locktype for NFSv4 LOCKT operation (the R= there means range, not read):

16:29:18.30188   10.0.100.3 -> 10.0.100.2   NFS C 4 (lock_test   ) PUTFH FH=BB3E LOCKT R=0:10

Compare with the LOCK operation (please note WR for write lock):

16:41:52.79830   10.0.100.3 -> 10.0.100.2   NFS C 4 (lock        ) PUTFH FH=BB3E LOCK WR 0:10 LSQ=1 LST=14BE:1

For LOCKU this is printed (please note that for the LOCKU operation the locktype value is ignored, so it is not needed to print it):

16:49:25.76486   10.0.100.3 -> 10.0.100.2   NFS C 4 (unlock      ) PUTFH FH=BB3E LOCKU R=0:10 LSQ=7 LST=14BE:4 

Also, in a case there is a conflicting lock, the range returned is not in a form of OFFSET:LENGTH, but a space is used instead of colon:

16:50:23.84954   10.0.100.2 -> 10.0.100.3   NFS R 4 (lock        ) NFS4ERR_DENIED PUTFH NFS4_OK LOCK NFS4ERR_DENIED WR 0 10 LO=10B6 
Actions #1

Updated by Marcel Telka over 6 years ago

This fix will:

  1. for LOCKT calll: remove R= and print the actual locktype,
  2. for LOCKU call: remove R=,
  3. for LOCK and LOCKT DENIED replies: change "OFFSET LENGTH" to "OFFSET:LENGTH".
Actions #2

Updated by Marcel Telka over 6 years ago

  • Description updated (diff)
Actions #4

Updated by Marcel Telka over 6 years ago

  • Status changed from In Progress to Pending RTI
Actions #5

Updated by Electric Monk over 6 years ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit 2d8dae53e7585d2412a48eceb751cbfaea048241

commit  2d8dae53e7585d2412a48eceb751cbfaea048241
Author: Marcel Telka <marcel@telka.sk>
Date:   2017-02-17T18:31:33.000Z

    7883 snoop(1m) should print locktype for NFSv4 LOCKT operation
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com>
    Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF