#4268 new defect

libio rename file system handler interface does not pass the from name

Reported by: Chris Johns Owned by:
Priority: normal Milestone: Indefinite
Component: lib Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The rename file system handler is:

typedef int (*rtems_filesystem_rename_t)(
  const rtems_filesystem_location_info_t *oldparentloc,
  const rtems_filesystem_location_info_t *oldloc,
  const rtems_filesystem_location_info_t *newparentloc,
  const char *name,
  size_t namelen
);

The location struct lets a file system hold an opaque reference to an internal file system struct for the node in the file system being renamed. This model breaks down if the file system supports a node reference that maps to the file system and the directory contains hard links. A hard link is a directory entry to a node in the file system. Given only the node reference you cannot determine which directory entry the user specified in the rename call.
It is a lot of work to require a file system to track name entries for back annotating from a node to the specific directory reference. File systems like NFS require names in the protocol. The existing NFSv2 hacks around the issue by holding the eval tokens in a memory pool to match against the handler call.
There are other calls that suffer from this problem.

Change History (0)

Note: See TracTickets for help on using tickets.