feat: support user-spcae pci rescan
[lunaix-os.git] / lunaix-os / kernel / fs / iso9660 / inode.c
index fa3337b88f5d993f9d4dc3e6907b4d1f1ed3ba69..ac151b32d10759697d05b06bdadcf0afc4c1dd5b 100644 (file)
@@ -61,6 +61,7 @@ iso9660_fill_inode(struct v_inode* inode, struct iso_drecache* dir, int ino)
 
     inode->id = ino;
     inode->lb_addr = dir->extent_addr;
+    inode->lb_usage = ICEIL(dir->data_size, fu_len);
     inode->ops = &iso_inode_ops;
     inode->default_fops = &iso_file_ops;
 
@@ -76,8 +77,8 @@ iso9660_fill_inode(struct v_inode* inode, struct iso_drecache* dir, int ino)
     if (dir->xattr_len) {
         struct iso_xattr* xattr = (struct iso_xattr*)valloc(ISO9660_BLKSZ);
         // Only bring in single FU, as we only care about the attributes.
-        errno =
-          dev->read(dev, xattr, ISO9660_BLKSZ * inode->lb_addr, ISO9660_BLKSZ);
+        errno = dev->ops.read(
+          dev, xattr, ISO9660_BLKSZ * inode->lb_addr, ISO9660_BLKSZ);
         if (errno < 0) {
             return EIO;
         }