[RTEMS Project] #2415: Duplicate code in Untar_FromMemory(), Untar_FromFile() and rtems_tarfs_load()

RTEMS trac trac at rtems.org
Sun May 15 23:51:27 UTC 2016


#2415: Duplicate code in Untar_FromMemory(), Untar_FromFile() and
rtems_tarfs_load()
-----------------------------+---------------------
 Reporter:  sebastian.huber  |       Owner:
     Type:  defect           |      Status:  new
 Priority:  normal           |   Milestone:  4.11.1
Component:  General          |     Version:  4.10
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+---------------------

Comment (by chrisj):

 Reviewing the code I suspect it might be difficult to merge the
 functionality as things exist.

 The loading of a tar file into the IMFS seems to be mixing POSIX
 functionality and internal IMFS functionality. The IMFS tar file load code
 directly references the tar image for the file contents. The referencing
 is nice where RAM usage is important but there are assumptions being made
 such as the storage for the tar file has to remain valid for the life time
 of the mount and there is no other activity in the IMFS when this call is
 made. I am also not sure how locking in the file system is managed when
 the references to the file contents are being made. Is this code thread
 safe in regards to the operation of the IMFS?

 The libmisc untar code does not handle the full tar semantics when
 updating an existing directory tree. Ticket #2207 covers this issue. I am
 not sure how these semantics would relate to the IMFS implementation if
 that is at all possible.

 I think special access to the IMFS to allow neat features such as adding a
 file node based on a piece of memory is a good idea but I think having
 things like tar code in the IMFS file system tree and a direct user API
 call is wrong. I wonder is the IMFS should be given a /dev node and ioctl
 calls made to access any special features. This would provide us with a
 robust user interface we could control. Once this is done we would be in a
 better position to provide a common implementation for tar loading as well
 as supporting the full tar semantics.

--
Ticket URL: <http://devel.rtems.org/ticket/2415#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list