FAQ Database Discussion Community

AWS Block Devices name doesn't match with CentOS SoftLink

On AWS EC2 Block Device is identified as /dev/sda, /dev/sdf and /dev/sdg, but inside EC2 CentOS instance when I do ll /dev/sd* it gives following: lrwxrwxrwx. 1 root root 4 Feb 17 03:10 /dev/sda -> xvde lrwxrwxrwx. 1 root root 4 Feb 17 03:10 /dev/sdj -> xvdj lrwxrwxrwx. 1 root...

Linux Kernel: Get real path behind a symlink

I'm working on some linux kernel stuff and I have a fake path called /dev/blah/whatever that points to /dev/block/real_device The issue is that lookup_bdev will fail to follow the symlink so I'd like to massage the path upfront by getting the real path (/dev/block/real_device) so I can hand that off...

How is a process state updated to blocked state (TASK_INTERRUPTABLE)?

When a process is waiting for IO, how is the task state updated to TASK_INTERRUPTABLE (that is, blocked)? Imagine this case, a process issues an IO request to a block device. According to my previous thread, the process finally invokes elv_add_request() to add the request to the IO queue. So...