IBM Support

QSHELL Cannot List Current Working Directory When It Is an NFS Mount to a Linux System

Troubleshooting


Problem

This document provides information about a problem in QSHELL where listing the current working directory fails when the current working directory is an NFS mount to a Linux system.

Resolving The Problem

In QSHELL, listing the current working directory fails when the current working directory is an NFS mount to a Linux system:

$ ls
qsh: 001-0011 Error found getting current working directory.
Input/output error.

The contents of the directory can be listed if the full path to the directory is specified. It is only listing the current working directory that fails. WRKLNK will also list the contents without error. NFS mounts to IBM AIX work in QSHELL completely without issue.

This is considered a working as designed limitation of QSHELL, and there are no plans to change the design.

Specifically, the QSHELL interface uses the QP0L_DV_DIRENT view when requesting the directory listing. The QP0L_DV_DIRENT view requires that the first two entries returned on a readdir to offset 0 be '.' and '..'. Because the IBM System i products VFS architecture requires that '.' and '..' be the first entries returned for the QP0L_DV_DIRENT view, the NFS client must return an EIO errno to indicate that the readdir information from the server precluded the NFS client from constructing an output buffer that satisfies the requirements of the selected output format.

QSHELL uses the POSIX readdir API. The POSIX specifications do not specify if readdir() must return entries for '.' and '..' first or not. Because AIX returns '.' and '..' first, QSHELL conforms to the AIX implementation. Linux returns '.' and '..', however, Linux does not return it first.

Neither implementation violates the specification. QSHELL design conforms to the AIX implementation; however, the Linux implementation does not.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

459080354

Document Information

More support for:
IBM i

Software version:
6.1.0

Operating system(s):
IBM i

Document number:
636449

Modified date:
11 November 2019

UID

nas8N1014214

Manage My Notification Subscriptions