From: Boaz Harrosh <bharrosh@panasas.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: avishay@gmail.com, jeff@garzik.org, akpm@linux-foundation.org,
linux-fsdevel@vger.kernel.org, osd-dev@open-osd.org,
linux-kernel@vger.kernel.org,
James.Bottomley@HansenPartnership.com, jens.axboe@oracle.com,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/8] exofs: Kbuild, Headers and osd utils
Date: Mon, 16 Feb 2009 11:19:21 +0200 [thread overview]
Message-ID: <49992F99.1060404@panasas.com> (raw)
In-Reply-To: <20090216180028C.fujita.tomonori@lab.ntt.co.jp>
FUJITA Tomonori wrote:
> On Mon, 16 Feb 2009 10:49:39 +0200
> Boaz Harrosh <bharrosh@panasas.com> wrote:
>
>> FUJITA Tomonori wrote:
>>> On Mon, 9 Feb 2009 15:12:09 +0200
>>> Boaz Harrosh <bharrosh@panasas.com> wrote:
>>>
>>>> This patch includes osd infrastructure that will be used later by
>>>> the file system.
>>>>
>>>> Also the declarations of constants, on disk structures,
>>>> and prototypes.
>>>>
>>>> And the Kbuild+Kconfig files needed to build the exofs module.
>>>>
>>>> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
>>>> ---
>>>> fs/exofs/Kbuild | 30 +++++++
>>>> fs/exofs/Kconfig | 13 +++
>>>> fs/exofs/common.h | 181 +++++++++++++++++++++++++++++++++++++++++
>>>> fs/exofs/exofs.h | 139 ++++++++++++++++++++++++++++++++
>>>> fs/exofs/osd.c | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>> 5 files changed, 593 insertions(+), 0 deletions(-)
>>>> create mode 100644 fs/exofs/Kbuild
>>>> create mode 100644 fs/exofs/Kconfig
>>>> create mode 100644 fs/exofs/common.h
>>>> create mode 100644 fs/exofs/exofs.h
>>>> create mode 100644 fs/exofs/osd.c
>>>> +static void _osd_read(struct osd_request *or,
>>>> + const struct osd_obj_id *obj, uint64_t offset, struct bio *bio)
>>>> +{
>>>> + osd_req_read(or, obj, bio, offset);
>>>> + EXOFS_DBGMSG("osd_req_read(p=%llX, ob=%llX, l=%llu, of=%llu)\n",
>>>> + _LLU(obj->partition), _LLU(obj->id), _LLU(bio->bi_size),
>>>> + _LLU(offset));
>>>> +}
>>>> +
>>>> +#ifdef __KERNEL__
>>> Hmm?
>>>
>> Yep, this file also complies in user mode.
>
> Even if you do, it's a good thing to add __KERNEL__ to fs/*.c?
>
>
>>>> +static struct bio *_bio_map_pages(struct request_queue *req_q,
>>>> + struct page **pages, unsigned page_count,
>>>> + size_t length, gfp_t gfp_mask)
>>>> +{
>>>> + struct bio *bio;
>>>> + int i;
>>>> +
>>>> + bio = bio_alloc(gfp_mask, page_count);
>>>> + if (!bio) {
>>>> + EXOFS_DBGMSG("Failed to bio_alloc page_count=%d\n", page_count);
>>>> + return NULL;
>>>> + }
>>>> +
>>>> + for (i = 0; i < page_count && length; i++) {
>>>> + size_t use_len = min(length, PAGE_SIZE);
>>>> +
>>>> + if (use_len !=
>>>> + bio_add_pc_page(req_q, bio, pages[i], use_len, 0)) {
>>>> + EXOFS_ERR("Failed bio_add_pc_page req_q=%p pages[i]=%p "
>>>> + "use_len=%Zd page_count=%d length=%Zd\n",
>>>> + req_q, pages[i], use_len, page_count, length);
>>>> + bio_put(bio);
>>>> + return NULL;
>>>> + }
>>>> +
>>>> + length -= use_len;
>>>> + }
>>>> +
>>>> + WARN_ON(length);
>>>> + return bio;
>>>> +}
>>> 1) exofs builds bios by hand.
>>> 2) exofs passes bio to OSD SCSI ULD.
>>>
>>> As a result, exofs and OSD SCSI ULD need to know the internal of bio,
>>> that is, you reinvent the bio handling infrastructure, as pointed out
>>> in another thread in scsi-ml.
>>>
>>> _bio_map_pages is called where the VFS passes an array of a pointer to
>>> a page frame.
>>>
>>> Why can't you simply pass the array to OSD SCSI ULD? Then OSD SCSI ULD
>>> can use the block layer helper functions to build a request out of
>>> pages without knowing the internal of bio.
>>>
>>>
>> Because actually this code is wrong and temporary and will change soon.
>> At vfs write_pages I do not get a linear array of page pointers but a
>> link-list of pages. This will not fit any current model.
>
> Then, why can't you pass a link-list of pages?
>
What? How to do that? I mean how to move from link-list of pages
to request?
>
>> Also looking
>> ahead I will have RAID 0, 1, 5, and 6 on objects of different devices. bio
>> is the perfect collector for memory information in this situation.
>
> You will add such features to exofs, handling multiple devices
> internally?
>
Multiple objects on Multiple devices, Yes.
>
>> exofs is not the first and only file system who is using bios. Proof of
>> the matter is that block exports a bio submit routine.
>
> Seems that exofs just passes pages and the ULD sends a SCSI command
> including these pages. I don't see how exofs needs to handle bio
> directly.
>
How do you propose to collect these pages? and keep them without allocating
an extra list? without pre-allocating a struct request? and without re-inventing
the bio structure?
>
>> As I said on the other thread, I could live without it for now, for a short while,
>> but I will regret it badly and it will hurt performance in the long run.
>>
>> <snip>
>>
>> Boaz
next prev parent reply other threads:[~2009-02-16 9:19 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 13:07 [PATCHSET 0/8 version 3] exofs Boaz Harrosh
2009-02-09 13:12 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Boaz Harrosh
2009-02-16 4:18 ` FUJITA Tomonori
2009-02-16 8:49 ` Boaz Harrosh
2009-02-16 9:00 ` FUJITA Tomonori
2009-02-16 9:19 ` Boaz Harrosh [this message]
2009-02-16 9:27 ` Jeff Garzik
2009-02-16 10:19 ` Boaz Harrosh
2009-02-16 11:05 ` pNFS rant (was Re: [PATCH 1/8] exofs: Kbuild, Headers and osd utils) Jeff Garzik
2009-02-16 12:45 ` Boaz Harrosh
2009-02-16 15:50 ` James Bottomley
2009-02-16 16:27 ` Benny Halevy
2009-02-16 16:23 ` Benny Halevy
2009-02-16 9:38 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils FUJITA Tomonori
2009-02-16 10:29 ` Boaz Harrosh
2009-02-17 0:20 ` FUJITA Tomonori
2009-02-17 8:10 ` [osd-dev] " Boaz Harrosh
2009-02-27 8:09 ` FUJITA Tomonori
2009-03-01 10:43 ` Boaz Harrosh
2009-02-09 13:18 ` [PATCH 2/8] exofs: file and file_inode operations Boaz Harrosh
2009-02-09 13:20 ` [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations Boaz Harrosh
2009-02-09 13:22 ` [PATCH 4/8] exofs: address_space_operations Boaz Harrosh
2009-02-09 13:24 ` [PATCH 5/8] exofs: dir_inode and directory operations Boaz Harrosh
2009-02-15 17:08 ` Evgeniy Polyakov
2009-02-16 9:31 ` Boaz Harrosh
2009-03-15 18:10 ` Boaz Harrosh
2009-03-15 18:37 ` Evgeniy Polyakov
2009-02-09 13:25 ` [PATCH 6/8] exofs: super_operations and file_system_type Boaz Harrosh
2009-02-15 17:24 ` Evgeniy Polyakov
2009-02-16 9:59 ` Boaz Harrosh
2009-02-09 13:29 ` [PATCH 7/8] exofs: Documentation Boaz Harrosh
2009-02-09 13:31 ` [PATCH 8/8] fs: Add exofs to Kernel build Boaz Harrosh
-- strict thread matches above, loose matches on Subject: below --
2009-03-18 17:45 [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-18 17:57 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Boaz Harrosh
[not found] ` <1237399056-29171-1-git-send-email-bharrosh@panasas.com>
2009-03-31 8:04 ` Andrew Morton
2009-03-31 8:57 ` Boaz Harrosh
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=49992F99.1060404@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=avishay@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=osd-dev@open-osd.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).