public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Donald Douwsma <ddouwsma@bigpond.net.au>
To: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] [LIBXCMD]: Move error messages to appropriate places.
Date: Fri, 30 Jan 2009 02:07:22 +1100	[thread overview]
Message-ID: <4981C62A.6020503@bigpond.net.au> (raw)
In-Reply-To: <200901291543.07441.arekm@maven.pl>

Arkadiusz Miskiewicz wrote:
> On Thursday 29 of January 2009, Donald Douwsma wrote:
>> Arkadiusz Miśkiewicz wrote:
>>> Replace raw perror() with proper message in
>>> fs_table_initialise_mounts().
>>>
>>> Replace raw perror() with proper message and move it from
>>> fs_mount_point_from_path() to fs_table_initialise_projects() where this
>>> message has meaning.
>> I like your change, it makes things clearer.
>>
>> But does this particular error actually help people? I've seen it a few
>> times when testing quota code in the past. It's only used when reading in
>> projects, and causes errors to be displayed even when issuing non project
>> commands.
>>
>> $ sudo bash -c "echo 10:/var/nonexistantdir >> /etc/projects
>> $ xfs_quota -c print
>> /var/nonexistantdir: No such file or directory
>> Filesystem          Pathname
>> /home               /dev/sda8
> 
> Now it will be:
> xfs_quota: cannot find mount point for path `/var/nonexistantdir': No such 
> file or directory
> 
>> I'd be tempted to remove this error, and add error checking code to the
>> project specific commands that walk tree's.
> 
> The path won't be added to walk iterator and there will be no error at walk 
> time. 

Good point, if we dont give the error at that point there is no way for the user to
find out what happened, not good.

> 
> The fix would be probably to not add project to the iterating engine when 
> asking for non-project things etc. 

That would be nice, in the meantime I think your change is a good idea.

Don

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-01-29 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 18:24 [PATCH] [LIBXCMD]: Move error messages to appropriate places Arkadiusz Miśkiewicz
2009-01-29  9:30 ` Nathan Scott
2009-01-29 14:29 ` Donald Douwsma
2009-01-29 14:43   ` Arkadiusz Miskiewicz
2009-01-29 15:07     ` Donald Douwsma [this message]
2009-01-29 22:09 ` Christoph Hellwig

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=4981C62A.6020503@bigpond.net.au \
    --to=ddouwsma@bigpond.net.au \
    --cc=arekm@maven.pl \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox