kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Adam Trhon <adam.trhon@tbs-biometrics.com>
To: "kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Why is my block device busy?
Date: Mon, 20 Jan 2020 12:51:15 +0000	[thread overview]
Message-ID: <20200120135113.0c3534d2@loki02> (raw)

Hello,

I have an embedded x86 machine with Linux 5.2.21. The system is
built using OpenEmbedded. When I update the machine from a live USB
(/dev/sda), I override the whole internal memory (/dev/mmcblk1), and
then I get this error:

fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

(I use fdisk for notifying kernel about the changes).

To find out where it is mounted I run

mount | grep mmc

before overwriting /dev/mmcblk1, but it prints nothing. So I run

dmesg | grep mmc

and I see this:

(... a lot of kernel prints ...)
Freeing unused kernel image memory: 1000K
Write protecting kernel text and read-only data: 14468k
NX-protecting the kernel data: 7000k
Run /init as init process
EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
(... a lot of kernel prints ...)

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
 ? mount_bdev+0x15a/0x180
 ? ext4_nfs_get_inode+0x50/0x50
 ext4_mount+0x15/0x20
 ? ext4_calculate_overhead+0x520/0x520
 legacy_get_tree+0x22/0x50
 vfs_get_tree+0x24/0xe0
 do_mount+0x5e3/0x880
 ksys_mount+0xa1/0xb0
 sys_mount+0x1c/0x20
 do_fast_syscall_32+0x82/0x230
 entry_SYSENTER_32+0x6b/0xbe

but I don't see anything that makes sense to me. What causes the
device to be busy?

Thank you
Adam


-- 
Ing. Adam Trhoň, Software Engineer
Touchless Biometric Systems s.r.o. | 
Palackého třída 180/44 | 61200 Brno | CZECH REPUBLIC | 
Mobile: +42(0) 721 565 113 | tbs-biometrics.cz
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2020-01-21 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 12:51 Adam Trhon [this message]
2020-01-21 17:50 ` Why is my block device busy? Valdis Klētnieks
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=20200120135113.0c3534d2@loki02 \
    --to=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).