All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH 1/4] ide-tape: remove tape->cache_stage
Date: Tue, 11 Mar 2008 00:24:51 +0100	[thread overview]
Message-ID: <200803110024.51339.bzolnier@gmail.com> (raw)
In-Reply-To: <1205082632-3418-2-git-send-email-petkovbb@gmail.com>

On Sunday 09 March 2008, Borislav Petkov wrote:
> Prior to allocating a new pipeline stage, the code checked for the existence of
> a cached pipeline stage to use. Do away with and stick to normal pipeline
> stages only.
> 
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>

I modified it slightly while merging since AFAICS we still need to check
'tape->nr_stages >= tape_max_stages' for idetape_add_chrdev_write_request().

From: Borislav Petkov <petkovbb@googlemail.com>
Subject: [PATCH 1/4] ide-tape: remove tape->cache_stage

Prior to allocating a new pipeline stage, the code checked for the existence of
a cached pipeline stage to use. Do away with and stick to normal pipeline
stages only.

[bart: keep idetape_kmalloc_stage() for now]

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-tape.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Index: b/drivers/ide/ide-tape.c
===================================================================
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -365,8 +365,6 @@ typedef struct ide_tape_obj {
 	idetape_stage_t *next_stage;
 	/* New requests will be added to the pipeline here */
 	idetape_stage_t *last_stage;
-	/* Optional free stage which we can use */
-	idetape_stage_t *cache_stage;
 	int pages_per_stage;
 	/* Wasted space in each stage */
 	int excess_bh_size;
@@ -1686,16 +1684,10 @@ abort:
 
 static idetape_stage_t *idetape_kmalloc_stage(idetape_tape_t *tape)
 {
-	idetape_stage_t *cache_stage = tape->cache_stage;
-
 	debug_log(DBG_PROCS, "Enter %s\n", __func__);
 
 	if (tape->nr_stages >= tape->max_stages)
 		return NULL;
-	if (cache_stage != NULL) {
-		tape->cache_stage = NULL;
-		return cache_stage;
-	}
 	return __idetape_kmalloc_stage(tape, 0, 0);
 }
 
@@ -3245,10 +3237,7 @@ static int idetape_chrdev_release(struct
 		else
 			idetape_wait_for_pipeline(drive);
 	}
-	if (tape->cache_stage != NULL) {
-		__idetape_kfree_stage(tape->cache_stage);
-		tape->cache_stage = NULL;
-	}
+
 	if (minor < 128 && test_bit(IDETAPE_FLAG_MEDIUM_PRESENT, &tape->flags))
 		(void) idetape_rewind_tape(drive);
 	if (tape->chrdev_dir == IDETAPE_DIR_NONE) {

  reply	other threads:[~2008-03-10 23:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 17:10 [PATCH 0/4] ide-tape: remove pipeline functionality-v2 Borislav Petkov
2008-03-09 17:10 ` Borislav Petkov
2008-03-09 17:10 ` [PATCH 1/4] ide-tape: remove tape->cache_stage Borislav Petkov
2008-03-09 17:10   ` Borislav Petkov
2008-03-10 23:24   ` Bartlomiej Zolnierkiewicz [this message]
2008-03-11  6:40     ` Borislav Petkov
2008-03-09 17:10 ` [PATCH 2/4] ide-tape: remove pipeline-specific code from idetape_add_chrdev_write_request Borislav Petkov
2008-03-09 17:10   ` Borislav Petkov
2008-03-10 23:25   ` Bartlomiej Zolnierkiewicz
2008-03-12  5:41     ` Borislav Petkov
2008-03-12 13:51       ` Bartlomiej Zolnierkiewicz
2008-03-12 14:31       ` Bartlomiej Zolnierkiewicz
2008-03-09 17:10 ` [PATCH 3/4] ide-tape remove pipeline speed/control calculations Borislav Petkov
2008-03-09 17:10   ` Borislav Petkov
2008-03-10 23:25   ` Bartlomiej Zolnierkiewicz
2008-03-09 17:10 ` [PATCH 4/4] ide-tape: remove pipeline-specific code from idetape_add_chrdev_read_request() Borislav Petkov
2008-03-09 17:10   ` Borislav Petkov
2008-03-10 23:25   ` Bartlomiej Zolnierkiewicz
2008-03-12  5:58     ` Borislav Petkov
2008-03-12 13:51       ` Bartlomiej Zolnierkiewicz
2008-03-13  6:19         ` Borislav Petkov
2008-03-10 23:24 ` [PATCH 0/4] ide-tape: remove pipeline functionality-v2 Bartlomiej Zolnierkiewicz

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=200803110024.51339.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    --cc=petkovbb@googlemail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.