All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>,
	Kazuya Mio <k-mio@sx.jp.nec.com>
Subject: Re: [PATCH] e4defrag: Handle device symlinks
Date: Sat, 28 Jul 2012 17:54:09 -0400	[thread overview]
Message-ID: <20120728215409.GH659@thunk.org> (raw)
In-Reply-To: <500859C6.6040401@redhat.com>

On Thu, Jul 19, 2012 at 02:02:30PM -0500, Eric Sandeen wrote:
> Device nodes are commonly accessed via symlinks, i.e.
> 
> # ls -l /dev/mapper/testvg-testlv 
> lrwxrwxrwx. 1 root root 7 Jul 19 13:01 /dev/mapper/testvg-testlv -> ../dm-0
> 
> Today, e4defrag on such a device will fail:
> 
> # e4defrag -c /dev/mapper/testvg-testlv 
> File is not regular file
>  "/dev/mapper/testvg-testlv"
> 
> due to it being a link, and e4defrag on the link target does as well:
> 
> # e4defrag -c /dev/dm-0 
> Filesystem is not mounted
> 
> due to the target not being found in /etc/mtab.
> 
> Fix this by checking whether the symlink target is a block device
> and if so, using that device in main(), and also changing get_mount_point()
> to search for a matching device number, not device name.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Thanks, applied.

					- Ted

      parent reply	other threads:[~2012-07-28 21:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 19:02 [PATCH] e4defrag: Handle device symlinks Eric Sandeen
2012-07-19 19:04 ` Eric Sandeen
2012-07-28 21:54 ` Theodore Ts'o [this message]

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=20120728215409.GH659@thunk.org \
    --to=tytso@mit.edu \
    --cc=k-mio@sx.jp.nec.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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.