login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
21
Re: [PATCH 04/17] ide-tape: remove idetape_empty_write_pipeline()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Bartlomiej Zolnierkiewicz
Subject:
Re: [PATCH 04/17] ide-tape: remove idetape_empty_write_pipeline()
Date: Thursday, March 20, 2008 - 5:09 pm
On Monday 17 March 2008, Borislav Petkov wrote:
quoted text
> In order _not_ to skip over some pipeline stages left, we carefully flush any > remaining ones. Nevertheless, this is only a temporary measure (git-bisect) > before removing pipeline functionality completely. > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com> > --- > drivers/ide/ide-tape.c | 80 ++---------------------------------------------- > 1 files changed, 3 insertions(+), 77 deletions(-) > > diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c > index 429fed4..d4a94d5 100644 > --- a/drivers/ide/ide-tape.c > +++ b/drivers/ide/ide-tape.c > @@ -2041,80 +2041,6 @@ static void idetape_wait_for_pipeline(ide_drive_t *drive) > } > } > > -static void idetape_empty_write_pipeline(ide_drive_t *drive) > -{ > - idetape_tape_t *tape = drive->driver_data; > - int blocks, min; > - struct idetape_bh *bh; > - > - if (tape->chrdev_dir != IDETAPE_DIR_WRITE) { > - printk(KERN_ERR "ide-tape: bug: Trying to empty write pipeline," > - " but we are not writing.\n"); > - return; > - } > - if (tape->merge_stage_size > tape->stage_size) { > - printk(KERN_ERR "ide-tape: bug: merge_buffer too big\n"); > - tape->merge_stage_size = tape->stage_size; > - } > - if (tape->merge_stage_size) { > - blocks = tape->merge_stage_size / tape->blk_size; > - if (tape->merge_stage_size % tape->blk_size) { > - unsigned int i; > - > - blocks++; > - i = tape->blk_size - tape->merge_stage_size % > - tape->blk_size; > - bh = tape->bh->b_reqnext; > - while (bh) { > - atomic_set(&bh->b_count, 0); > - bh = bh->b_reqnext; > - } > - bh = tape->bh; > - while (i) { > - if (bh == NULL) { > - printk(KERN_INFO "ide-tape: bug," > - " bh NULL\n"); > - break; > - } > - min = min(i, (unsigned int)(bh->b_size - > - atomic_read(&bh->b_count))); > - memset(bh->b_data + atomic_read(&bh->b_count), > - 0, min); > - atomic_add(min, &bh->b_count); > - i -= min; > - bh = bh->b_reqnext; > - } > - } > - (void) idetape_add_chrdev_write_request(drive, blocks); > - tape->merge_stage_size = 0;
this patch has the same problems as patch #3 => skipped
quoted text
> - } > - idetape_wait_for_pipeline(drive); > - if (tape->merge_stage != NULL) { > - __idetape_kfree_stage(tape->merge_stage); > - tape->merge_stage = NULL; > - } > - clear_bit(IDETAPE_FLAG_PIPELINE_ERR, &tape->flags); > - tape->chrdev_dir = IDETAPE_DIR_NONE; > - > - /* > - * On the next backup, perform the feedback loop again. (I don't want to > - * keep sense information between backups, as some systems are > - * constantly on, and the system load can be totally different on the > - * next backup). > - */ > - tape->max_stages = tape->min_pipeline; > - if (tape->first_stage != NULL || > - tape->next_stage != NULL || > - tape->last_stage != NULL || > - tape->nr_stages != 0) { > - printk(KERN_ERR "ide-tape: ide-tape pipeline bug, " > - "first_stage %p, next_stage %p, " > - "last_stage %p, nr_stages %d\n", > - tape->first_stage, tape->next_stage, > - tape->last_stage, tape->nr_stages); > - } > -} > - > static int idetape_init_read(ide_drive_t *drive, int max_stages) > { > idetape_tape_t *tape = drive->driver_data; > @@ -2123,7 +2049,7 @@ static int idetape_init_read(ide_drive_t *drive, int max_stages) > /* Initialize read operation */ > if (tape->chrdev_dir != IDETAPE_DIR_READ) { > if (tape->chrdev_dir == IDETAPE_DIR_WRITE) { > - idetape_empty_write_pipeline(drive); > + idetape_wait_for_pipeline(drive); > idetape_flush_tape_buffers(drive); > } > if (tape->merge_stage || tape->merge_stage_size) { > @@ -2702,7 +2628,7 @@ static int idetape_chrdev_ioctl(struct inode *inode, struct file *file, > debug_log(DBG_CHRDEV, "Enter %s, cmd=%u\n", __func__, cmd); > > if (tape->chrdev_dir == IDETAPE_DIR_WRITE) { > - idetape_empty_write_pipeline(drive); > + idetape_wait_for_pipeline(drive); > idetape_flush_tape_buffers(drive); > } > if (cmd == MTIOCGET || cmd == MTIOCPOS) { > @@ -2852,7 +2778,7 @@ static void idetape_write_release(ide_drive_t *drive, unsigned int minor) > { > idetape_tape_t *tape = drive->driver_data; > > - idetape_empty_write_pipeline(drive); > + idetape_wait_for_pipeline(drive); > tape->merge_stage = __idetape_kmalloc_stage(tape, 1, 0); > if (tape->merge_stage != NULL) { > idetape_pad_zeros(drive, tape->blk_size *
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/17] ide-tape: remove pipeline functionality-v3
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 01/17] ide-tape: remove unused parameter from ideta ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 02/17] ide-tape: remove unused parameter from ideta ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 03/17] ide-tape: remove idetape_discard_read_pipeline()
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 04/17] ide-tape: remove idetape_empty_write_pipeline()
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 05/17] ide-tape: remove pipeline-specific code in i ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 06/17] ide-tape: remove idetape_pipeline_size()
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 07/17] ide-tape: remove idetape_remove_stage_head()
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 08/17] ide-tape: remove pipeline-specific code from ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 09/17] ide-tape: unwrap idetape_queue_pc_tail()
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 10/17] ide-tape: remove remaining pipeline function ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 11/17] ide-tape: remove pipeline-specific code from ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 12/17] ide-tape: remove pipelined mode parameters
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 13/17] ide-tape: remove pipelined mode tape control ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 14/17] ide-tape: remove pipeline-specific members f ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 15/17] ide-tape: remove misc references to pipeline ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 16/17] ide-tape: remove pipelined mode description ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
[PATCH 17/17] ide-tape: remove comments markup from Docume ...
, Borislav Petkov
, (Sun Mar 16, 11:41 pm)
Re: [PATCH 01/17] ide-tape: remove unused parameter from i ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 2:42 pm)
Re: [PATCH 02/17] ide-tape: remove unused parameter from i ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 2:42 pm)
Re: [PATCH 0/17] ide-tape: remove pipeline functionality-v3
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:04 pm)
Re: [PATCH 03/17] ide-tape: remove idetape_discard_read_pi ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 04/17] ide-tape: remove idetape_empty_write_pip ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 05/17] ide-tape: remove pipeline-specific code ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 06/17] ide-tape: remove idetape_pipeline_size()
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 07/17] ide-tape: remove idetape_remove_stage_head()
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 08/17] ide-tape: remove pipeline-specific code ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 09/17] ide-tape: unwrap idetape_queue_pc_tail()
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 10/17] ide-tape: remove remaining pipeline func ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 11/17] ide-tape: remove pipeline-specific code ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 13/17] ide-tape: remove pipelined mode tape con ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 14/17] ide-tape: remove pipeline-specific membe ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 12/17] ide-tape: remove pipelined mode parameters
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 15/17] ide-tape: remove misc references to pipe ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 16/17] ide-tape: remove pipelined mode descript ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Re: [PATCH 17/17] ide-tape: remove comments markup from Do ...
, Bartlomiej Zolnierki ...
, (Thu Mar 20, 5:09 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Nick Piggin
Re: [PATCH 2/2] smp_call_function: use rwlocks on queues rather than rcu
Kyle Moffett
Re: [PATCH 1/4] stringbuf: A string buffer implementation
Ingo Molnar
Re: [PATCH 00/12] mm/x86: bootmem
Andrew Morton
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
git
:
Stephen Boyd
Re: [PATCH] Speed up bash completion loading
Jakub Narebski
Re: Avery Pennarun's git-subtree?
Junio C Hamano
Re: [PATCH v2 04/13] Teach rebase interactive the mark command
Catalin Marinas
Re: [ANNOUNCE] Stacked GIT 0.14.2
Eric Wong
[PATCH 5/5] rerere: add the diff command
git-commits-head
:
Linux Kernel Mailing List
[POWERPC] fsl_soc: add support to gianfar for fixed-link property
Linux Kernel Mailing List
fat: fix parse_options()
Linux Kernel Mailing List
ipmi: add oem message handling
Linux Kernel Mailing List
powerpc/85xx/86xx: Fix build w/ CONFIG_PCI=n
Linux Kernel Mailing List
KVM: x86 emulator: during rep emulation decrement ECX only if emulation succeeded
linux-netdev
:
Paweł Staszewski
Re: DCA/IOAT problem
Jarek Poplawski
Re: [PATCH iproute2] Re: HTB accuracy for high speed
Ingo Oeser
Re: [NET-NEXT PATCH 3/3] e1000e: add support for new 82574L part
Rick Jones
Re: UDP path MTU discovery
Dmitry Kozlov
Re: [PATCH v8] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)
openbsd-misc
:
David Vasek
Re: how to undelete?
Gruppo BCC
Banca inviato una notifica che e necessario completare
Pau Amaro-Seoane
Re: First install: Grub doesn't find partitions
Nick Holland
Re: Unattended OpenBSD Installation
stuart van Zee
Re: CVS hosed
Colocation donated by:
Syndicate