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)
Wed, May 8, 1:37 AM
Unknown Object (File)
Wed, May 8, 12:45 AM
Unknown Object (File)
Thu, May 2, 6:50 PM
Unknown Object (File)
Tue, Apr 30, 7:16 AM
Unknown Object (File)
Tue, Apr 30, 7:15 AM
Unknown Object (File)
Tue, Apr 30, 7:07 AM
Unknown Object (File)
Tue, Apr 30, 7:07 AM
Unknown Object (File)
Tue, Apr 30, 12:25 AM
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 2323
Build 2332: 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.