Re: [PATCH v3 bpf-next 02/10] lib/buildid: add single page-based file reader abstraction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 30, 2024 at 01:39:06PM -0700, Andrii Nakryiko wrote:
> +	union {
> +		struct {
> +			struct address_space *mapping;
> +			struct page *page;

NAK.  All the page-based interfaces are deprecated.  Only we can't mark
them as deprecated because our tooling is a pile of crap.

> +			void *page_addr;
> +			u64 file_off;

loff_t pos.

> +	r->page = find_get_page(r->mapping, pg_off);

r->folio = read_mapping_folio(r->mapping, r->pos / PAGE_SIZE, ...)

OK, for network filesystems, you're going to need to retain the struct
file that's used to access them.  So maybe this becomes
	read_mapping_folio(r->file->f_mapping, r->pos, r->file)

> +	r->page_addr = kmap_local_page(r->page);

kmap_local_folio(r->folio, offset_in_folio(r->folio, r->pos));





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux