<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2021-08-26</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000106040</issuerCik>
        <issuerName>WESTERN DIGITAL CORP</issuerName>
        <issuerTradingSymbol>WDC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001192521</rptOwnerCik>
            <rptOwnerName>EULAU ROBERT K</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>5601 GREAT OAKS PARKWAY</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SAN JOSE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95119</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>EVP &amp; CFO</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2021-08-26</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1685</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>131981</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Dividend Equivalent Rights</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F3"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2021-08-26</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>46.8879</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F3"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F3"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>46.8879</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1202.6627</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Represents stock units that have been earned by the Reporting Person as payment in respect of the vesting of performance-based restricted stock units. These shares are scheduled to vest on September 4, 2022.</footnote>
        <footnote id="F2">The amount of securities beneficially owned by the Reporting Person, as disclosed in two Form 4s filed by the Reporting Person on August 31, 2021 and September 7, 2021 (together, the &quot;Subsequent Form 4s&quot;), did not give effect to the transaction reported herein. As a result, the Subsequent Form 4s underreported the number of share of the Issuer's common stock beneficially owned by the Reporting Person by 1,685 shares. As of the filing of this report and after giving effect to the transaction reported herein, the Reporting Person beneficially owns 131,981 shares of the Issuer's common stock.</footnote>
        <footnote id="F3">These shares represent the number of incremental dividend equivalents awarded based on the achievement rate of the related performance-based restricted stock units.</footnote>
        <footnote id="F4">The amount of securities beneficially owned by the Reporting Person, as disclosed in the Subsequent Form 4s, did not give effect to the transaction reported herein. As a result, the Subsequent Form 4s underreported the number of dividend equivalents beneficially owned by the Reporting Person by 46.8879. As of the filing of this report and after giving effect to the transaction reported herein, the Reporting Person beneficially owns 1,202.6627 dividend equivalents.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Sandra Garcia Attorney-in-Fact for Robert K. Eulau</signatureName>
        <signatureDate>2021-09-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
