Hi Roman, On Fri, Jun 1, 2018 at 4:25 AM Roman Storozhenko <romeusmeister@xxxxxxxxx> wrote: > > Hello everybody. > > I am modifying ufshcd driver: > https://elixir.bootlin.com/linux/v3.8/source/drivers/scsi/ufs/ufshcd.c > > I do a read of a file on ext4 filesystem and want to obtain the file's > inode. But it seems that there are no structures contatin any > references to inode at this level of abstraction. I'm no expert, I'm just answering so you actually have an answer, not because I have any good knowledge in this area. This is by design - by the time the data gets to the hardware the associated file is both irrelevant and unobtainable: the read or write might be metadata or housekeeping, the filesystem might be log-structured so it's reading or writing bits of 5 different files, the upper layer might be a swap partition or something more exotic, it might be part of a disk check, there might be software RAID between the filesystem and hardware, etc. Why do you need this data and what are you trying to accomplish here? > I looked into scsi_cmd structure and all the structures it references > to. Also I used ftrace to find on which level of abstraction inode > disappear but without any luck. Could you please say to me where I > could find the lowest level where inode is still present and the best > way how to pass it throughout linux io stack to the ufshcd driver? > Frankly speaking I need not struct inode as a whole but just its > number, so using reserved or unused fields of existing structures is > appropriate. The inode number is part of the filesystem so it wouldn't appear below that layer. Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx Profile: http://www.google.com/profiles/julian.calaby/