Discussion:
[PATCH] Remove SMB_VFS_READ from the VFS.
(too old to reply)
Jeremy Allison via samba-technical
2018-05-02 20:50:51 UTC
Permalink
Thanks a *lot* Ralph for your help on this.

Here is the more difficult to review patchset,
due to the fact it's having to change some
very old printing code.

Patchset #1 removes all uses of SMB_VFS_READ
from source3/printing/nt_printing.c. This is
*very* old and crustly code, so I started by
reformatting to modern standards, followed
by splitting out a monster function into
several functons called by the now-smaller
parent, and finally tried to change one
element at a time to move towards a clean
set of functions that only call a single
function - printing_pread_data() - that
uses read_file(), which takes an offset
as well as length.

The reformatting changes no behavior,
but should make the actual changes
easier to see and understand.

Patchset #2 removes SMB_VFS_READ
from the VFS.

Please review and push if happy.

Thanks !

Jeremy.
Jeremy Allison via samba-technical
2018-05-02 20:57:13 UTC
Permalink
Post by Jeremy Allison via samba-technical
Thanks a *lot* Ralph for your help on this.
Here is the more difficult to review patchset,
due to the fact it's having to change some
very old printing code.
Patchset #1 removes all uses of SMB_VFS_READ
from source3/printing/nt_printing.c. This is
*very* old and crustly code, so I started by
reformatting to modern standards, followed
by splitting out a monster function into
several functons called by the now-smaller
parent, and finally tried to change one
element at a time to move towards a clean
set of functions that only call a single
function - printing_pread_data() - that
uses read_file(), which takes an offset
as well as length.
The reformatting changes no behavior,
but should make the actual changes
easier to see and understand.
Just as an FYI, if you *really* hate having to
review the reformatting and modern coding
standards changes, I can produce a more
minimal patch that merely modifies the
existing ugly code to achieve the same
effect (calling read_file() instead of
SMB_VFS_LSEEK/SMB_VFS_READ) - but that
would leave a ton of really ugly code
alone (with massive functions and
indentation left as-is).

So currently I prefer my reformatting,
but I'm flexible on this :-).

Jeremy
Ralph Böhme via samba-technical
2018-05-04 20:34:31 UTC
Permalink
Post by Jeremy Allison via samba-technical
Thanks a *lot* Ralph for your help on this.
Here is the more difficult to review patchset,
due to the fact it's having to change some
very old printing code.
Patchset #1 removes all uses of SMB_VFS_READ
from source3/printing/nt_printing.c. This is
*very* old and crustly code, so I started by
reformatting to modern standards, followed
by splitting out a monster function into
several functons called by the now-smaller
parent, and finally tried to change one
element at a time to move towards a clean
set of functions that only call a single
function - printing_pread_data() - that
uses read_file(), which takes an offset
as well as length.
The reformatting changes no behavior,
but should make the actual changes
easier to see and understand.
Patchset #2 removes SMB_VFS_READ
from the VFS.
Please review and push if happy.
pushed.

-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
GPG Key Fingerprint: FAE2 C608 8A24 2520 51C5
59E4 AA1E 9B71 2639 9E46
Loading...