[RTEMS Project] #4674: readdir skips entries after unlink

RTEMS trac trac at rtems.org
Thu Jul 7 13:17:07 UTC 2022


#4674: readdir skips entries after unlink
-----------------------------+----------------------------
 Reporter:  Alexandre Oliva  |       Owner:  Needs Funding
     Type:  defect           |      Status:  assigned
 Priority:  normal           |   Milestone:  6.1
Component:  fs               |     Version:  6
 Severity:  normal           |  Resolution:
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+----------------------------

Comment (by Alexandre Oliva):

 I've looked a little into this.  The JFFS2 implementation marks entries as
 removed, and there are even comments that not doing so messes up getdents,
 but the rfs implementation, rtems_rfs_dir_del_entry in
 cpukit/libfs/src/rfs/rtems-rfs-dir.c, copies the remainder of the dir onto
 the removed entry, instead of marking the entry as empty/unused.  I
 suppose dropping empty entries and shrinking the block should be avoided
 if the dir is open, but I don't know how to check for that.

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


More information about the bugs mailing list