6690 set_nfsv4_ephemeral_mount_to() tries to read AUTOMOUNT_TIMEOUT from defunct /etc/default/autofs

Review Request #828 — Created Feb. 1, 2018 and submitted

marcel
illumos-gate
master
6690
4c7e99a...
general
This fixes the set_nfsv4_ephemeral_mount_to() function so it reads the
configuration option from smf instead of the obsolete /etc/default/autofs file.
Without the fix:

# sharectl set -p timeout=100 autofs
# sharectl get -p timeout autofs
timeout=100
# mount -o vers=4 t1:/rpool/TEST /mnt
# KEY=$(mdb -ke 'nfs4_ephemeral_key::print')
# PTR=$(mdb -ke "::zsd $KEY" | tail -n1 | awk '{print $3}')
# mdb -ke "$PTR::print nfs4_trigger_globals_t ntg_mount_to"
ntg_mount_to = 0x258
#

With the fix:

# sharectl set -p timeout=100 autofs
# sharectl get -p timeout autofs
timeout=100
# mount -o vers=4 t1:/rpool/TEST /mnt
# KEY=$(mdb -ke 'nfs4_ephemeral_key::print')
# PTR=$(mdb -ke "::zsd $KEY" | tail -n1 | awk '{print $3}')
# mdb -ke "$PTR::print nfs4_trigger_globals_t ntg_mount_to"
ntg_mount_to = 0x64
#
  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
yuripv
  1. 
      
  2. usr/src/cmd/fs.d/nfs/lib/nfs_subr.c (Diff revision 1)
     
     

    You could use strtonum(3C) here instead of rolling out your own.

  3. 
      
marcel
marcel
yuripv
  1. Thank you.

  2. 
      
tsoome
  1. Ship It!
  2. 
      
marcel
Review request changed

Status: Closed (submitted)

Change Summary:

commit b4509b050d50104aa22638bf66c219627cf301af
Author:     Marcel Telka <marcel@telka.sk>
AuthorDate: Thu Feb 1 11:19:37 2018 +0100
Commit:     Dan McDonald <danmcd@joyent.com>
CommitDate: Fri Feb 2 14:34:12 2018 -0500

    6690 set_nfsv4_ephemeral_mount_to() tries to read AUTOMOUNT_TIMEOUT from defunct /etc/default/autofs
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

:100644 100644 0dbdbbe6a3... 1279a519d8... M	usr/src/cmd/fs.d/nfs/lib/nfs_subr.c
Loading...