From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Philipp Reisner To: drbd-dev@linbit.com Subject: Re: [Drbd-dev] inter-arch PAGE_SIZE problem Date: Mon, 27 Sep 2004 16:04:18 +0200 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409271604.18224.philipp.reisner@linbit.com> Cc: List-Id: Coordination of development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am Freitag, 24. September 2004 14:37 schrieb Lars Ellenberg: > int drbd_make_request_26(request_queue_t *q, struct bio *bio) > { > ... > /* > * what we "blindly" assume: > */ > D_ASSERT(bio->bi_size > 0); > D_ASSERT( (bio->bi_size & 0x1ff) == 0); > D_ASSERT(bio->bi_size <= PAGE_SIZE); > D_ASSERT(bio->bi_vcnt == 1); > D_ASSERT(bio->bi_idx == 0); > > oopsie. > we are going to send PAGE_SIZE requests over the wire, > but the other side may have a different PAGE_SIZE... > > // mirrored write > int receive_Data(drbd_dev *mdev,Drbd_Header* h) > { > ... > /* I expect a block to be a multiple of 512 byte, and > * no more than 4K (PAGE_SIZE). is this too restrictive? > */ > ERR_IF(data_size == 0) return FALSE; > ERR_IF(data_size & 0x1ff) return FALSE; > ERR_IF(data_size > PAGE_SIZE) return FALSE; > > > we need to agree to use fixed 4K, I guess. optionally negotiate a > higher "drbd_page_size" during the initial connection handshake. Right. we should consider this. But I think a general high performace solution is not neccesary, since cluster of machines with different PAGE_SIZE are of academic interest only. (IMHO) I think for drbd-0.8 it is sufficient to inform the user about the fact... [...] > > does that all make sense? Yes, right! -philipp