From: Arne Jansen <sensille@gmx.net>
To: Josef Bacik <josef@redhat.com>
Cc: chris.mason@oracle.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 1/6] btrfs: add READAHEAD extent buffer flag
Date: Wed, 29 Jun 2011 20:24:51 +0200 [thread overview]
Message-ID: <4E0B6DF3.6010906@gmx.net> (raw)
In-Reply-To: <4E0B6B33.6090308@redhat.com>
On 29.06.2011 20:13, Josef Bacik wrote:
> On 06/29/2011 12:32 PM, Arne Jansen wrote:
>> Add a READAHEAD extent buffer flag.
>> Add a function to trigger a read with this flag set.
>>
>> Changes v2:
>> - use extent buffer flags instead of extent state flags
>>
>> Signed-off-by: Arne Jansen<sensille@gmx.net>
>> ---
>> fs/btrfs/disk-io.c | 32 ++++++++++++++++++++++++++++++++
>> fs/btrfs/disk-io.h | 2 ++
>> fs/btrfs/extent_io.h | 1 +
>> 3 files changed, 35 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>> index 0339cc0..0195172 100644
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -945,6 +945,38 @@ int readahead_tree_block(struct btrfs_root *roo=
t, u64 bytenr, u32 blocksize,
>> return ret;
>> }
>>
>> +int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u=
32 blocksize,
>> + int mirror_num, struct extent_buffer **eb)
>> +{
>> + struct extent_buffer *buf =3D NULL;
>> + struct inode *btree_inode =3D root->fs_info->btree_inode;
>> + struct extent_io_tree *io_tree =3D&BTRFS_I(btree_inode)->io_tree;
>> + int ret;
>> +
>> + buf =3D btrfs_find_create_tree_block(root, bytenr, blocksize);
>> + if (!buf)
>> + return 0;
>> +
>> + set_bit(EXTENT_BUFFER_READAHEAD,&buf->bflags);
>> +
>> + ret =3D read_extent_buffer_pages(io_tree, buf, 0, 0, 1, btree_get_=
extent,
>> + mirror_num);
>
> This patch doesn't compile for me, it says there are too many argumen=
ts here.
Ok, commit d1310b2e0cd98eb134 changed a lot here, I'll take a lot how t=
o
rebase this and send a v4.
Thanks,
Arne
>
> [root@destiny btrfs-work]# make M=3Dfs/btrfs
> CC [M] fs/btrfs/disk-io.o
> fs/btrfs/disk-io.c: In function =91reada_tree_block_flagged=92:
> fs/btrfs/disk-io.c:963:6: warning: passing argument 5 of =91read_exte=
nt_buffer_pages=92 makes pointer from integer without a cast [enabled b=
y default]
> fs/btrfs/extent_io.h:244:5: note: expected =91struct extent_map * (*)=
(struct inode *, struct page *, size_t, u64, u64, int)=92 but argume=
nt is of type =91int=92
> fs/btrfs/disk-io.c:963:6: warning: passing argument 6 of =91read_exte=
nt_buffer_pages=92 makes integer from pointer without a cast [enabled b=
y default]
> fs/btrfs/extent_io.h:244:5: note: expected =91int=92 but argument is =
of type =91struct extent_map * (*)(struct inode *, struct page *, size_=
t, u64, u64, int)=92
> fs/btrfs/disk-io.c:963:6: error: too many arguments to function =91re=
ad_extent_buffer_pages=92
> fs/btrfs/extent_io.h:244:5: note: declared here
> make[1]: *** [fs/btrfs/disk-io.o] Error 1
> make: *** [_module_fs/btrfs] Error 2
>
> Thanks,
>
> Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-06-29 18:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 16:32 [PATCH v3 0/6] btrfs: generic readeahead interface Arne Jansen
2011-06-29 16:32 ` [PATCH v3 1/6] btrfs: add READAHEAD extent buffer flag Arne Jansen
2011-06-29 18:13 ` Josef Bacik
2011-06-29 18:24 ` Arne Jansen [this message]
2011-06-29 18:48 ` Arne Jansen
2011-06-29 16:32 ` [PATCH v3 2/6] btrfs: state information for readahead Arne Jansen
2011-06-29 16:32 ` [PATCH v3 3/6] btrfs: initial readahead code and prototypes Arne Jansen
2011-06-29 16:32 ` [PATCH v3 4/6] btrfs: hooks for readahead Arne Jansen
2011-06-29 16:32 ` [PATCH v3 5/6] btrfs: test ioctl " Arne Jansen
2011-06-29 16:32 ` [PATCH v3 6/6] btrfs: use readahead API for scrub Arne Jansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E0B6DF3.6010906@gmx.net \
--to=sensille@gmx.net \
--cc=chris.mason@oracle.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).