| To: | Utz Lehmann <leh@xxxxxxxxxx> |
|---|---|
| Subject: | Re: shutdown umount hangs |
| From: | Russell Cattelan <cattelan@xxxxxxxxxxx> |
| Date: | Wed, 04 Apr 2001 21:13:08 -0400 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| References: | <20010329165519.A7386@xxxxxxxxxx> <3ACA530B.E9ECD29D@xxxxxxxxxxx> <20010404130641.C1150@xxxxxxxxxx> |
| Sender: | owner-linux-xfs@xxxxxxxxxxx |
Ok try this patch... Since we haven't been able to reproduce the problem here I don't know if it will help or not, but give it a try. It doesn't appear to make thing any worse :-) -- Russell Cattelan -- Digital Elves inc. -- Currently on loan to SGI Linux XFS core developer. --- /usr/tmp/TmpDir.18409-0/linux/fs/pagebuf/page_buf.c_1.72 Wed Apr 4
20:07:15 2001
+++ linux/fs/pagebuf/page_buf.c Wed Apr 4 20:06:35 2001
@@ -2172,11 +2172,6 @@
continue;
}
- pb->pb_flags &= ~PBF_DELWRI;
- pb->pb_flags |= PBF_WRITE;
- if (flags & PBDF_WAIT)
- pb->pb_flags &= ~PBF_ASYNC;
-
/* insert a place holder */
list_add(&pb_marker_ptr->pb_list, curr);
@@ -2184,40 +2179,33 @@
&pb_daemon->pb_delwrite_lock,
save);
- if (pb->pb_flags & _PBF_LOCKABLE){
- if (flags & PBDF_PINCOUNT){
- /* if we are doing this pin count thing
and we can't get the lock just skip it for now */
- }if (!pagebuf_cond_lock(pb)){
- __pagebuf_iorequest(pb);
- } else {
- (*pincount)++;
- /* make it async again... don't want
to wait on in below */
- pb->pb_flags |= PBF_ASYNC;
- }
- }else {
- pagebuf_lock(pb);
+ /* if (pb->pb_flags & _PBF_LOCKABLE){ */
+ /* meta data pagebufs better be lockable
pagebuf's */
+ assert(pb->pb_flags & _PBF_LOCKABLE);
+
+ if (!pagebuf_ispin(pb) && (0 ==
pagebuf_cond_lock(pb))){
+ pb->pb_flags &= ~PBF_DELWRI;
+ pb->pb_flags |= PBF_WRITE;
+ if (flags & PBDF_WAIT)
+ pb->pb_flags &= ~PBF_ASYNC;
+
__pagebuf_iorequest(pb);
+ } else {
+ if (flags & PBDF_PINCOUNT)
+ (*pincount)++;
}
-
- spin_lock_irqsave(
- &pb_daemon->pb_delwrite_lock,
- save);
+ spin_lock_irqsave(&pb_daemon->pb_delwrite_lock,
save);
/*
* ok got the lock back; pick up the place
* holder and continue on
*/
curr = pb_marker_ptr->pb_list.next;
list_del(&pb_marker_ptr->pb_list);
- } else {
- /* not doing anything with current...
- * move on to the next one */
- curr = curr->next;
- }
- } else {
- /* not doing anything with current...
- * move on to the next one */
- curr = curr->next;
- }
+ }
+ }
+ /* not doing anything with current...
+ * move on to the next one */
+ curr = curr->next;
}
spin_unlock_irqrestore(&pb_daemon->pb_delwrite_lock, save);
@@ -2270,14 +2258,13 @@
PB_TRACE(pb, PB_TRACE_REC(walkq3), pagebuf_ispin(pb));
if (pb->pb_target == target) {
- int sync = (pb->pb_flags & PBF_ASYNC) == 0;
list_add(&pb_marker_ptr->pb_list, curr);
spin_unlock_irqrestore(
&pb_daemon->pb_delwrite_lock,
flags);
- if (sync) {
+ if (!(pb->pb_flags & PBF_ASYNC)) {
pagebuf_iowait(pb);
pb->pb_flags |= PBF_ASYNC;
pagebuf_delwri_dequeue(pb);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: BUG 820228 - ASSERT trip in qa 017, Martin K. Petersen |
|---|---|
| Next by Date: | BUG 820246 - xfsdump recently not updating inventory in incrementals, tes@xxxxxxxxxxxx |
| Previous by Thread: | Re: shutdown umount hangs, Utz Lehmann |
| Next by Thread: | Re: shutdown umount hangs, cattelan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |