Download raw body.
Move buf_realloc_pages in buf.h
On Wed, Jun 04, 2025 at 04:39:48PM +0200, Rafael Sadowski wrote: > I see no reason why this XXX should not be solved. When the comment was written sys/buf.h didn't pull in uvm_extern.h. This was changed by beck 7 years later while working on the buffer cache. ok tb > > diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c > index 63d146be15c..e39c4ff6986 100644 > --- a/sys/kern/vfs_bio.c > +++ b/sys/kern/vfs_bio.c > @@ -57,9 +57,6 @@ > #include <sys/tracepoint.h> > #include <uvm/uvm_extern.h> > > -/* XXX Should really be in buf.h, but for uvm_constraint_range.. */ > -int buf_realloc_pages(struct buf *, struct uvm_constraint_range *, int); > - > struct uvm_constraint_range high_constraint; > int fliphigh; > > diff --git a/sys/sys/buf.h b/sys/sys/buf.h > index 5c08b91e6ef..51b99e0f16c 100644 > --- a/sys/sys/buf.h > +++ b/sys/sys/buf.h > @@ -284,6 +284,7 @@ int buf_dealloc_mem(struct buf *); > void buf_fix_mapping(struct buf *, vsize_t); > void buf_alloc_pages(struct buf *, vsize_t); > void buf_free_pages(struct buf *); > +int buf_realloc_pages(struct buf *, struct uvm_constraint_range *, int); > > void minphys(struct buf *bp); > int physio(void (*strategy)(struct buf *), dev_t dev, int flags, >
Move buf_realloc_pages in buf.h