On Fri, 24.09.10 12:06, [email protected] ([email protected]) wrote:

> From: Harald Hoyer <[email protected]>
> 
> Some files on btrfs do not have a physical extent. Just return an
> increasing number.

Hmm, why an increasing number? Care to elaborate?

> ---
>  src/readahead-collect.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/src/readahead-collect.c b/src/readahead-collect.c
> index 7983b31..f7f0f14 100644
> --- a/src/readahead-collect.c
> +++ b/src/readahead-collect.c
> @@ -146,6 +146,7 @@ static unsigned long fd_first_block(int fd) {
>                  struct fiemap fiemap;
>                  struct fiemap_extent extent;
>          } data;
> +     static unsigned long ul = 0;
>  
>          zero(data);
>          data.fiemap.fm_length = ~0ULL;
> @@ -160,6 +161,12 @@ static unsigned long fd_first_block(int fd) {
>          if (data.fiemap.fm_extents[0].fe_flags & FIEMAP_EXTENT_UNKNOWN)
>                  return 0;
>  
> +     // Some filesystems/files do not have a physical extent.
> +     // Just return an increasing number.

And a nitpick:

Hey, this is C, not C++. 

/* this is nice */
// this not so much.

(yes, systemd is C99, but we only use the nice feature additions of it,
not the evil ones...)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to