On 31.05.19 г. 19:03 ч., David Sterba wrote: > On Fri, May 31, 2019 at 06:01:14PM +0300, Nikolay Borisov wrote: >> --- >> fs/btrfs/volumes.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++ >> fs/btrfs/volumes.h | 2 + >> 2 files changed, 100 insertions(+) >> >> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c >> index 776f5c7ca7c5..b130f465ca6d 100644 >> --- a/fs/btrfs/volumes.c >> +++ b/fs/btrfs/volumes.c >> @@ -5907,6 +5907,104 @@ static bool need_full_stripe(enum btrfs_map_op op) >> return (op == BTRFS_MAP_WRITE || op == BTRFS_MAP_GET_READ_MIRRORS); >> } >> >> +/* >> + * btrfs_io_geometry - calculates the geomery of a particular (address, len) >> + * tuple. This information is used to calculate how big a >> + * particular bio can get before it straddles a stripe. >> + * >> + * @fs_info - The omnipresent btrfs structure >> + * @logical - Address that we want to figure out the geometry of >> + * @len - The length of IO we are going to perform, starting at @logical >> + * @op - Type of operation - Write or Read >> + * @io_geom - Pointer used to return values >> + * >> + * Returns < 0 in case a chunk for the given logical address cannot be found, >> + * usually shouldn't happen unless @logical is corrupted, 0 otherwise. >> + */ >> +int btrfs_io_geometry(struct btrfs_fs_info *fs_info, enum btrfs_map_op op, >> + u64 logical, u64 len, struct btrfs_io_geometry *io_geom) > > Where is struct btrfs_io_geometry defined? > > And changelog and signed-off-by are missing. Yep, royally fucked up the submission :D >
