tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Restructure vfs_busy and friends



Currently we have:

- vfs_busy(mp, NULL) to take a reference on the mount and enter
  a critical section against unmounting.

- vfs_unbusy(mp, keepref, NULL) to leave the critical section and
  release the reference if "keepref == false".

- atomic_inc_uint(&mp->mnt_refcnt) to take a reference on the mount.

- vfs_destroy(mp) to release a reference on the mount.

Plan is to restructure this as follows:

- vfs_busy(mp) takes a reference and enters a critical section.
  The second "NULL" argument gets removed.

- vfs_unbusy(mp) leaves the critical section and releases the reference.
  The second and the third "NULL" argument gets removed.
  Calls with "keepref == true" get preceeded by vfs_ref(mp);

- vfs_ref(mp) takes a reference.
  Atomic increments get replaced by vfs_ref(mp).

- vfs_rele(mp) releases a reference.
  Vfs_destroy(mp) gets renamed to vfs_rele(mp).

Operation vfs_trybusy(mp) gets added when needed.

Comments or objections?
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)



Home | Main Index | Thread Index | Old Index