File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,17 @@ static inline bool folio_is_device_coherent(const struct folio *folio)
187187 return is_device_coherent_page (& folio -> page );
188188}
189189
190+ static inline bool is_fsdax_page (const struct page * page )
191+ {
192+ return is_zone_device_page (page ) &&
193+ page_pgmap (page )-> type == MEMORY_DEVICE_FS_DAX ;
194+ }
195+
196+ static inline bool folio_is_fsdax (const struct folio * folio )
197+ {
198+ return is_fsdax_page (& folio -> page );
199+ }
200+
190201#ifdef CONFIG_ZONE_DEVICE
191202void zone_device_page_init (struct page * page );
192203void * memremap_pages (struct dev_pagemap * pgmap , int nid );
Original file line number Diff line number Diff line change @@ -2115,6 +2115,13 @@ static inline bool folio_is_longterm_pinnable(struct folio *folio)
21152115 if (folio_is_device_coherent (folio ))
21162116 return false;
21172117
2118+ /*
2119+ * Filesystems can only tolerate transient delays to truncate and
2120+ * hole-punch operations
2121+ */
2122+ if (folio_is_fsdax (folio ))
2123+ return false;
2124+
21182125 /* Otherwise, non-movable zone folios can be pinned. */
21192126 return !folio_is_zone_movable (folio );
21202127
You can’t perform that action at this time.
0 commit comments