Skip to content

Delete dead code: dbuf_loan_arcbuf #17119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Mar 5, 2025

It's been dead ever since 5fa356e

Sponsored by: ConnectWise
Signed-off-by: Alan Somers [email protected]

Motivation and Context

General code maintenance

Description

Delete an unused function definition

How Has This Been Tested?

Haven't tested it at all. Relying on CI.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

It's been dead ever since 5fa356e

Sponsored by:	ConnectWise
Signed-off-by:	Alan Somers <[email protected]>
@amotin
Copy link
Member

amotin commented Mar 5, 2025

Not that I have objections, but after this arc_loan_inuse_buf() becomes unused, etc. I'd say would be good to investigate which of this code is still alive and could be possibly reused one day, and which may be long broken.

Copy link
Contributor

@tonyhutter tonyhutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like Lustre uses it. I think this code can go.

Copy link
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the code was used inside Solaris/Illumos kernel to save on buffer copy during read. It is kind of symmetric to dmu_assign_arcbuf*() we still use for writes, but there we use it to reduce open transaction time, which might still have some sense if pages pre-fault won't do the trick. I don't really like dropping code that has its purpose, but unless some OS we support develop similar zero-copy VFS API, it is unlikely to be used again.

@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label May 7, 2025
@ikozhukhov
Copy link
Contributor

I'd like do not drop this code too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants