lkml.org 
[lkml]   [2000]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bugfix in dquot_transfer()


On Sun, 17 Sep 2000, Jan Kara wrote:

> > How about the following:
> > * dquot_{alloc,free}_block() _never_ blocks.
> > * we have 3 inlined helper functions - alloc_block(), free_block() and
> > change_xid(). They get exclusion (BKL, spinlock, whatever) and update both
> > quota and i_blocks.
> >
> > Consequences:
> > * quota for filesystems without ->i_blocks is history. It doesn't
> > work anyway - quota for minixfs is so easy to screw that it's not even
> > funny.
> > * we can't print any messages from the dquot_{alloc,free}_block().
> > Let the helper thread do it - we would just add a request to queue and let
> > it pick the thing.
> > BTW, use of global buffer for creating the messages is
> > extremely bad idea - TTY output can block and you've got no protection
> > around print_warning().

> Seems I'll have to read that part of kernel... I didn't expect writing
> to console can block (especially as this code was there for ages).

Come again? It's current->tty, not console. Can be _any_ TTY driver. And
this code had been racey since conception (Melbourne quota was a major
PITA way before Linux appeared).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site