[RTEMS Project] #4268: libio rename file system handler interface does not pass the from name

RTEMS trac trac at rtems.org
Thu Feb 25 01:42:39 UTC 2021


#4268: libio rename file system handler interface does not pass the from name
--------------------------+------------------------
  Reporter:  Chris Johns  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  Indefinite
 Component:  lib          |    Version:  6
  Severity:  normal       |   Keywords:
Blocked By:               |   Blocking:
--------------------------+------------------------
 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.

--
Ticket URL: <http://devel.rtems.org/ticket/4268>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list