forked from thoughtpolice/bcachefs-tools
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bcachefs sources to bc01863fb6ef bcachefs: bcachefs_metadata_v…
…ersion_disk_accounting_big_endian Signed-off-by: Kent Overstreet <[email protected]>
- Loading branch information
Kent Overstreet
committed
Nov 30, 2024
1 parent
6829fb2
commit de51418
Showing
125 changed files
with
4,508 additions
and
2,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1dbc147a6eb08a0137a81a1fe4eb528186594bfe | ||
bc01863fb6eff06f7b028e4c5cd8850d21d7f10d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
/* Filesystem parameter description and parser | ||
* | ||
* Copyright (C) 2018 Red Hat, Inc. All Rights Reserved. | ||
* Written by David Howells ([email protected]) | ||
*/ | ||
|
||
#ifndef _LINUX_FS_PARSER_H | ||
#define _LINUX_FS_PARSER_H | ||
|
||
struct constant_table { | ||
const char *name; | ||
int value; | ||
}; | ||
|
||
extern int lookup_constant(const struct constant_table tbl[], const char *name, int not_found); | ||
|
||
extern const struct constant_table bool_names[]; | ||
|
||
#endif /* _LINUX_FS_PARSER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _LINUX_STRING_CHOICES_H_ | ||
#define _LINUX_STRING_CHOICES_H_ | ||
|
||
/* | ||
* Here provide a series of helpers in the str_$TRUE_$FALSE format (you can | ||
* also expand some helpers as needed), where $TRUE and $FALSE are their | ||
* corresponding literal strings. These helpers can be used in the printing | ||
* and also in other places where constant strings are required. Using these | ||
* helpers offers the following benefits: | ||
* 1) Reducing the hardcoding of strings, which makes the code more elegant | ||
* through these simple literal-meaning helpers. | ||
* 2) Unifying the output, which prevents the same string from being printed | ||
* in various forms, such as enable/disable, enabled/disabled, en/dis. | ||
* 3) Deduping by the linker, which results in a smaller binary file. | ||
*/ | ||
|
||
#include <linux/types.h> | ||
|
||
static inline const char *str_enable_disable(bool v) | ||
{ | ||
return v ? "enable" : "disable"; | ||
} | ||
#define str_disable_enable(v) str_enable_disable(!(v)) | ||
|
||
static inline const char *str_enabled_disabled(bool v) | ||
{ | ||
return v ? "enabled" : "disabled"; | ||
} | ||
#define str_disabled_enabled(v) str_enabled_disabled(!(v)) | ||
|
||
static inline const char *str_hi_lo(bool v) | ||
{ | ||
return v ? "hi" : "lo"; | ||
} | ||
#define str_lo_hi(v) str_hi_lo(!(v)) | ||
|
||
static inline const char *str_high_low(bool v) | ||
{ | ||
return v ? "high" : "low"; | ||
} | ||
#define str_low_high(v) str_high_low(!(v)) | ||
|
||
static inline const char *str_read_write(bool v) | ||
{ | ||
return v ? "read" : "write"; | ||
} | ||
#define str_write_read(v) str_read_write(!(v)) | ||
|
||
static inline const char *str_on_off(bool v) | ||
{ | ||
return v ? "on" : "off"; | ||
} | ||
#define str_off_on(v) str_on_off(!(v)) | ||
|
||
static inline const char *str_yes_no(bool v) | ||
{ | ||
return v ? "yes" : "no"; | ||
} | ||
#define str_no_yes(v) str_yes_no(!(v)) | ||
|
||
static inline const char *str_up_down(bool v) | ||
{ | ||
return v ? "up" : "down"; | ||
} | ||
#define str_down_up(v) str_up_down(!(v)) | ||
|
||
static inline const char *str_true_false(bool v) | ||
{ | ||
return v ? "true" : "false"; | ||
} | ||
#define str_false_true(v) str_true_false(!(v)) | ||
|
||
/** | ||
* str_plural - Return the simple pluralization based on English counts | ||
* @num: Number used for deciding pluralization | ||
* | ||
* If @num is 1, returns empty string, otherwise returns "s". | ||
*/ | ||
static inline const char *str_plural(size_t num) | ||
{ | ||
return num == 1 ? "" : "s"; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <asm/unaligned.h> |
Oops, something went wrong.