Skip to content

Commit

Permalink
file: remove deprecated file lifetime hint APIs
Browse files Browse the repository at this point in the history
These were deprecated in 2022 (1dc616a) in response for removal
for the kernel. We can safely remove the deprecated APIs now.
  • Loading branch information
avikivity committed Dec 25, 2024
1 parent a9bef53 commit 343d8c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
28 changes: 0 additions & 28 deletions include/seastar/core/file.hh
Original file line number Diff line number Diff line change
Expand Up @@ -462,20 +462,6 @@ public:
/// if the operation has failed
future<int> fcntl_short(int op, uintptr_t arg = 0UL) noexcept;

/// Set a lifetime hint for the open file descriptor corresponding to seastar::file
///
/// Write lifetime hints can be used to inform the kernel about the relative
/// expected lifetime of writes on a given inode or via open file descriptor.
/// An application may use the different hint values to separate writes into different
/// write classes, so that multiple users or applications running on a single storage back-end
/// can aggregate their I/O patterns in a consistent manner.
/// Refer fcntl(2) man page for more details on write lifetime hints.
///
/// \param hint the hint value of the stream
/// \return future indicating success or failure
[[deprecated("This API was removed from the kernel")]]
future<> set_file_lifetime_hint(uint64_t hint) noexcept;

/// Set a lifetime hint for the inode corresponding to seastar::file
///
/// Write lifetime hints can be used to inform the kernel about the relative
Expand All @@ -489,20 +475,6 @@ public:
/// \return future indicating success or failure
future<> set_inode_lifetime_hint(uint64_t hint) noexcept;

/// Get the lifetime hint of the open file descriptor of seastar::file which was set by
/// \ref set_file_lifetime_hint()
///
/// Write lifetime hints can be used to inform the kernel about the relative
/// expected lifetime of writes on a given inode or via open file descriptor.
/// An application may use the different hint values to separate writes into different
/// write classes, so that multiple users or applications running on a single storage back-end
/// can aggregate their I/O patterns in a consistent manner.
/// Refer fcntl(2) man page for more details on write lifetime hints.
///
/// \return the hint value of the open file descriptor
[[deprecated("This API was removed from the kernel")]]
future<uint64_t> get_file_lifetime_hint() noexcept;

/// Get the lifetime hint of the inode of seastar::file which was set by
/// \ref set_inode_lifetime_hint()
///
Expand Down
8 changes: 0 additions & 8 deletions src/core/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,6 @@ future<> file::set_lifetime_hint_impl(int op, uint64_t hint) noexcept {
});
}

future<> file::set_file_lifetime_hint(uint64_t hint) noexcept {
return set_lifetime_hint_impl(F_SET_FILE_RW_HINT, hint);
}

future<> file::set_inode_lifetime_hint(uint64_t hint) noexcept {
return set_lifetime_hint_impl(F_SET_RW_HINT, hint);
}
Expand All @@ -1210,10 +1206,6 @@ future<uint64_t> file::get_lifetime_hint_impl(int op) noexcept {
});
}

future<uint64_t> file::get_file_lifetime_hint() noexcept {
return get_lifetime_hint_impl(F_GET_FILE_RW_HINT);
}

future<uint64_t> file::get_inode_lifetime_hint() noexcept {
return get_lifetime_hint_impl(F_GET_RW_HINT);
}
Expand Down

0 comments on commit 343d8c4

Please sign in to comment.