Page MenuHomeFreeBSD

Rename aiocblist to kaiocb and use consistent variable names.
ClosedPublic

Authored by jhb on Jan 30 2016, 1:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 1:45 PM
Unknown Object (File)
Sep 17 2024, 6:25 AM
Unknown Object (File)
Sep 9 2024, 1:37 AM
Unknown Object (File)
Sep 8 2024, 12:17 PM
Unknown Object (File)
Sep 7 2024, 10:25 PM
Unknown Object (File)
Sep 7 2024, 12:12 PM
Unknown Object (File)
Aug 30 2024, 11:47 PM
Unknown Object (File)
Aug 24 2024, 8:31 PM
Subscribers

Details

Summary

Rename aiocblist to kaiocb and use consistent variable names.

Typically <foo>list is used for a structure that holds a list head in
FreeBSD, not for members of a list. As such, rename 'struct aiocblist'
to 'struct kaiocb' (the kernel version of 'struct aiocb').

While here, use more consistent variable names for AIO control blocks:

  • Use 'job' instead of 'aiocbe', 'cb', 'cbe', or 'iocb' for kernel job objects.
  • Use 'jobn' instead of 'cbn' for use with TAILQ_FOREACH_SAFE().
  • Use 'sjob' and 'sjobn' instead of 'scb' and 'scbn' for fsync jobs.
  • Use 'ujob' instead of 'aiocbp', 'job', 'uaiocb', or 'uuaiocb' to hold a user pointer to a 'struct aiocb'.
  • Use 'ujobp' instead of 'aiocbp' for a user pointer to a 'struct aiocb *'.

This is perhaps excessive (the various variable names in particular),
but it is more consistent IMO.

Test Plan
  • Build tested.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2401
Build 2417: arc lint + arc unit

Event Timeline

jhb retitled this revision from to Rename aiocblist to kaiocb and use consistent variable names..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: kib.
kib edited edge metadata.
kib added inline comments.
sys/kern/vfs_aio.c
250

There shoul be tabs after define.

496

Might be, lowercase zone names ?

949

Since you are changing style, perhaps remove initialization from declarations ?

This revision is now accepted and ready to land.Jan 30 2016, 10:50 AM
sys/kern/vfs_aio.c
496

For now I will leave these as-is to avoid noise in the diff. Looking in vmstat -z we do generally seem to prefer lower case zone names, but we do have some upper case names. I think the upper case names are actually places that used to use the old zone allocator pre-UMA.

jhb edited edge metadata.
  • Fix style on lines that are changing anyway.
This revision now requires review to proceed.Feb 5 2016, 8:25 PM
This revision was automatically updated to reflect the committed changes.