kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Adam Trhon <adam.trhon@tbs-biometrics.com>
Cc: "kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Re: Why is my block device busy?
Date: Tue, 21 Jan 2020 12:50:41 -0500	[thread overview]
Message-ID: <32873.1579629041@turing-police> (raw)
In-Reply-To: <20200120135113.0c3534d2@loki02>


[-- Attachment #1.1: Type: text/plain, Size: 1180 bytes --]

On Mon, 20 Jan 2020 12:51:15 +0000, Adam Trhon said:
> mount | grep mmc

You might want to dump the *entire* output of the mount command, and
see if something is mounted via an alias or devmapper entry, or if you're
using busybox and getting a stripped-down mount output.

You should also check with 'cat /proc/mounts'.

> EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)

Looks like something did mount a filesystem on the device. You probably should
figure out who/what did it before you scribble on the device.

> Next I modified the ext driver to print stack when mounting, and I got:
>
> Call Trace:
>  ? ext4_calculate_overhead+0x520/0x520
>  mount_bdev+0x15a/0x180

Looks like what I'd expect to see when in the mount syscall.  What were
you expecting to see here?

If you're trying to figure out who did the mount, the kernel stack trace probably
won't help.

More often, you'll need to resort to something like this:

mv /bin/mount /bin/mount.real

cat > /bin/mount
#!/bin/sh
ps lax
exec /bin/mount.real $*
^D

chmod +x /bin/mount

and then look at the parent process chain of the call in the ps output.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-01-21 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 12:51 Why is my block device busy? Adam Trhon
2020-01-21 17:50 ` Valdis Klētnieks [this message]
2020-01-24  9:36   ` Adam Trhon

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=32873.1579629041@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=adam.trhon@tbs-biometrics.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).