linux: fs: Add folio cache to address_space
Add a simple folio cache array to struct address_space for U-Boot's folio management, avoiding the need for Linux's XArray/radix tree infrastructure. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -50,6 +50,11 @@ struct path {
|
||||
|
||||
/* Buffer operations are in buffer_head.h */
|
||||
|
||||
#ifdef __UBOOT__
|
||||
/* Maximum number of cached folios per address_space */
|
||||
#define FOLIO_CACHE_MAX 64
|
||||
#endif
|
||||
|
||||
/* address_space - extended for inode.c */
|
||||
struct address_space {
|
||||
struct inode *host;
|
||||
@@ -58,6 +63,11 @@ struct address_space {
|
||||
unsigned long writeback_index;
|
||||
struct list_head i_private_list;
|
||||
const struct address_space_operations *a_ops;
|
||||
#ifdef __UBOOT__
|
||||
/* Simple folio cache for U-Boot (no XA/radix tree) */
|
||||
struct folio *folio_cache[FOLIO_CACHE_MAX];
|
||||
int folio_cache_count;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* block_device - minimal stub */
|
||||
|
||||
Reference in New Issue
Block a user