diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-02 13:16:29 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-02 13:16:29 -0500 |
commit | 136292522e43da46bee4c0fef80b2602f79525a2 (patch) | |
tree | 47c892c46e01fa4a3ef014f3737ecee3776969ee /include/linux/pagemap.h | |
parent | 8ed26ab8d59111c2f7b86d200d1eb97d2a458fd1 (diff) | |
parent | 118e10cd893d57df55b3302dfd188a981b6e6d1c (diff) | |
download | linux-136292522e43da46bee4c0fef80b2602f79525a2.tar.gz linux-136292522e43da46bee4c0fef80b2602f79525a2.tar.bz2 linux-136292522e43da46bee4c0fef80b2602f79525a2.zip |
Merge tag 'loongarch-kvm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD
LoongArch KVM changes for v6.8
1. Optimization for memslot hugepage checking.
2. Cleanup and fix some HW/SW timer issues.
3. Add LSX/LASX (128bit/256bit SIMD) support.
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index bf2965b01b35..2df35e65557d 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -203,8 +203,10 @@ enum mapping_flags { /* writeback related tags are not used */ AS_NO_WRITEBACK_TAGS = 5, AS_LARGE_FOLIO_SUPPORT = 6, - AS_RELEASE_ALWAYS = 7, /* Call ->release_folio(), even if no private data */ - AS_UNMOVABLE = 8, /* The mapping cannot be moved, ever */ + AS_RELEASE_ALWAYS, /* Call ->release_folio(), even if no private data */ + AS_STABLE_WRITES, /* must wait for writeback before modifying + folio contents */ + AS_UNMOVABLE, /* The mapping cannot be moved, ever */ }; /** @@ -290,6 +292,21 @@ static inline void mapping_clear_release_always(struct address_space *mapping) clear_bit(AS_RELEASE_ALWAYS, &mapping->flags); } +static inline bool mapping_stable_writes(const struct address_space *mapping) +{ + return test_bit(AS_STABLE_WRITES, &mapping->flags); +} + +static inline void mapping_set_stable_writes(struct address_space *mapping) +{ + set_bit(AS_STABLE_WRITES, &mapping->flags); +} + +static inline void mapping_clear_stable_writes(struct address_space *mapping) +{ + clear_bit(AS_STABLE_WRITES, &mapping->flags); +} + static inline void mapping_set_unmovable(struct address_space *mapping) { /* |